| | |
| | | }) |
| | | |
| | | // Vue.prototype.$appVersion = 'v1.0.3' //APPå½åçæ¬ //壿²£çæ¬ |
| | | Vue.prototype.$appVersion = 'v1.0.1' //APPå½åçæ¬ //大å²çæ¬ |
| | | // Vue.prototype.$appVersion = 'v1.0.1' //APPå½åçæ¬ //大å²çæ¬ |
| | | Vue.prototype.$appVersion = 'v1.0.1' //APPå½åçæ¬ //ä¸éçæ¬ |
| | | // Vue.prototype.$baseUrl = 'http://121.196.36.24:8021/api' //æ¬å°äº§å å·¨åçæ°æ®åº |
| | | // Vue.prototype.$baseUrl = 'http://122.227.18.22:8000/api' //æ¬å°äº§å å·¨ç«é²æ¤ï¼å®¢æ·å°åï¼ |
| | | // Vue.prototype.$baseUrl = 'http://121.196.36.24:8019/api' // |
| | |
| | | // Vue.prototype.$baseUrl = 'http://121.196.36.24:8039/api' //大å²é¡¹ç®ï¼2.0ï¼ |
| | | // Vue.prototype.$baseUrl = 'http://192.168.2.138:8080/api' //大å²é¡¹ç®ï¼2.0ï¼ å®¢æ·ç°åºå®é
æå¡å¨ip |
| | | |
| | | Vue.prototype.$baseUrl = 'http://192.168.0.32:8000/api' //ä¸éé¡¹ç® å®¢æ·ç°åºå®é
æå¡å¨ip |
| | | |
| | | Vue.prototype.$baseUrl = 'http://121.196.36.24:9090/api' //ææ°äº§å 2025/5/8 |
| | | // Vue.prototype.$baseUrl = 'http://121.196.36.24:9090/api' //ææ°äº§å 2025/5/8 |
| | | |
| | | |
| | | Vue.prototype.$companyType = 'B' //ä¼ä¸ç±»åï¼é¡¹ç®ç±»åï¼ Aï¼å·¨åï¼Bï¼å£æ²£ï¼ãB: 产å |
| | | |
| | | |
| | | |
| | | Vue.prototype.$companyType = 'C' //ä¼ä¸ç±»åï¼é¡¹ç®ç±»åï¼ Aï¼å·¨åï¼Bï¼å£æ²£ï¼ãB: 产å ï¼C:ä¸é |
| | | |
| | | // A: http://121.196.36.24:8021/api http://122.227.18.22:8000/api |
| | | // B: http://121.196.36.24:8032/api |
| | |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, { |
| | | "path": "pages/sbgl/rcdj2", |
| | | "style": { |
| | | "navigationBarTitleText": "æ¥å¸¸ç¹æ£", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, { |
| | | "path": "pages/sbgl/dqby2", |
| | | "style": { |
| | | "navigationBarTitleText": "宿ä¿å
»", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, { |
| | | "path": "pages/sbgl/wxsq2", |
| | | "style": { |
| | | "navigationBarTitleText": "ç»´ä¿®ç³è¯·", |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | } |
| | | ], |
| | | "globalStyle": { |
| | |
| | | data() { |
| | | return { |
| | | // #ifdef H5 |
| | | usercode: '001', |
| | | usercode: '', |
| | | // #endif |
| | | |
| | | // #ifdef APP-PLUS |
| | | usercode: '999', |
| | | usercode: '', |
| | | // #endif |
| | | |
| | | userpassword: '123', |
| | | userpassword: '', |
| | | isView: false, //å¯ç æ¯å¦å¯è§ |
| | | |
| | | isDisabledSubmitButton: false, //æäº¤æé®æ¯å¦å¤äºå è½½ä¸ |
| | |
| | | <page-nav title="宿ä¿å
»"></page-nav> |
| | | |
| | | |
| | | <view v-show="topContent.length===0"> |
| | | <view v-if="purchorderArrAll.length>0"> |
| | | <!-- <view class="mainContent" :style="{maxHeight: '1340rpx',overflow: 'scroll',padding:0}"> --> |
| | | |
| | | <!-- #ifdef H5 --> |
| | | <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> |
| | | <!-- #endif --> |
| | | |
| | | <!-- #ifdef APP-PLUS --> |
| | | <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> |
| | | <!-- #endif --> |
| | | |
| | | |
| | | <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='18' :name='item.code' :key="item.code" |
| | | :label="item.code+'/'+item.name"></u-radio> |
| | | </view> |
| | | <u-line v-if="index!==purchorderArr.length-1" color="#2979ff"></u-line> |
| | | </view> |
| | | </u-radio-group> |
| | | |
| | | <view class="footer" style="min-height:62rpx;"> |
| | | <u-button type="primary" size='large' :hairline="true" @click="navigateTo" text="ä¸ä¸æ¥"></u-button> |
| | | </view> |
| | | <!-- </view> --> |
| | | </view> |
| | | |
| | | |
| | | <view v-if="purchorderArrAll.length===0"> |
| | | <div class="sacnBody"> |
| | | <div class="scanImg" @click="topScanClick"></div> |
| | | <div class="scanText">æ«æä¿å
»å·¥ä½</div> |
| | | <div class="boxImg"></div> |
| | | <div class="scanText">ææ è®¾å¤/å·¥ä½</div> |
| | | </div> |
| | | </view> |
| | | |
| | | |
| | | <view v-show="topContent.length!==0"> |
| | | <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="28"></u-icon> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view class="marginLeft20 marginRight20" style="max-height: 180rpx;overflow:scroll;"> |
| | | <u-radio-group v-model="radioValue" class="flex_column"> |
| | | <view class="marginBottom20 flex_between" @click="groupChange(item.code)" |
| | | v-for="item in topContent" :key="item.code"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>å·¥ä½ç¼ç ï¼</view> |
| | | <view>å·¥ä½åç§°ï¼</view> |
| | | <view>ç产车é´ï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{item.code}}</view> |
| | | <view>{{item.name}}</view> |
| | | <view>{{item.wksp_name}}</view> |
| | | </view> |
| | | </view> |
| | | <u-radio size='20' :key="item.code" :name="item.code" |
| | | @change="groupChange(item.code)" activeColor="red"></u-radio> |
| | | </view> |
| | | </u-radio-group> |
| | | </view> |
| | | |
| | | </view> |
| | | <u-gap height="12" bgColor="#eff0f1"></u-gap> |
| | | <view class="head" style="height:86rpx;"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | ä¿å
»æ å |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginRight20 marginTop10" style="width: 200rpx;"> |
| | | <!-- <u-icon name="scan" @click="topScanClick" color="red" size="56"></u-icon> --> |
| | | <uni-data-select v-model="selectValueBZ" :clear="false" :localdata="selectRangeBZ" |
| | | @change="selectChangeBZ"> |
| | | </uni-data-select> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | <u-gap height="12" bgColor="#eff0f1"></u-gap> |
| | | |
| | | <view class="head"> |
| | | |
| | | <view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | ä¿å
»é¡¹ç®å
容 |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginRight20" style="width: 200rpx;"> |
| | | <uni-data-select v-model="selectValue" :clear="false" :localdata="selectRange" |
| | | @change="selectChange"> |
| | | </uni-data-select> |
| | | </view> |
| | | |
| | | </view> |
| | | <view :style="{maxHeight:'1000rpx',overflow: 'scroll'}"> |
| | | <view class="center_border flex_column" style="margin: 10rpx;" v-for="item in centerContent" |
| | | :key="item.code"> |
| | | |
| | | <view class="flex_between marginBottom10"> |
| | | <view class="center_title">{{item.name}}</view> |
| | | <view class="marginRight20" v-if="item.isscan==='Y'"> |
| | | <u-icon name="scan" @click="centerScanClick(item.code)" color="red" size="56"> |
| | | </u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="flex_between marginBottom10"> |
| | | <view class='inputClass marginTop10'> |
| | | <u--input :disabled='item.isDisabled' placeholder="请è¾å
¥" border="surround" |
| | | v-model="item.inputValue"></u--input> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex_center"> |
| | | <u-button type="primary" :plain="item.isOK!=='OK'" :disabled="item.isDisabled" |
| | | text="æ£å¸¸" @click="bwClick(item,'OK')"> |
| | | </u-button> |
| | | <u-button type="warning" :plain="item.isOK!=='NG'" :disabled="item.isDisabled" |
| | | text="å¼å¸¸" @click="bwClick(item,'NG')"> |
| | | </u-button> |
| | | </view> |
| | | </view> |
| | | <view class="titleFont"> |
| | | {{item.chkdesc}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="footer"> |
| | | <view class="head_block" style="align-items: center;padding: 0 23rpx;height: 100rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | ç¹æ£ç»æ |
| | | </view> |
| | | </view> |
| | | <view class="flex_center"> |
| | | <u-button type="primary" :plain="resultValue!=='OK'" style="height: 60rpx;" |
| | | :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0" |
| | | text="æ£å¸¸" @click="resultClick('OK')"></u-button> |
| | | <u-button type="warning" :plain="resultValue!=='NG'" style="margin-left: 20rpx;height: 60rpx;" |
| | | :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0" |
| | | text="å¼å¸¸" @click="resultClick('NG')"></u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | <u-button size="large" :loading="isDisabledSubmitButton" loadingText="æ£å¨æäº¤,请ç¨ç..." type="primary" |
| | | @click="submit" :disabled="resultValue===''" text="确认æäº¤"> |
| | | </u-button> |
| | | |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | |
| | | |
| | | <scan-code></scan-code> |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | RepairScanDeviceQrCodeData, |
| | | RepairSelectScanDeviceQrCodeItem, |
| | | RepairScanDeviceTemp, |
| | | AppDeviceRepairSave |
| | | } from '../../config/api.js' |
| | | import scanCode from '@/components/scan-code/scan-code.vue' |
| | | EqpPermissions |
| | | } from '../../config/api.js'; |
| | | export default { |
| | | components: { |
| | | scanCode |
| | | }, |
| | | onLoad(option) { |
| | | const _this = this |
| | | uni.$off('scancodedate') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scancodedate', function(content) { |
| | | console.log("æ«æå°çå
容为:", content) |
| | | _this.getRepairScanDeviceQrCodeData(content) |
| | | }) |
| | | }, |
| | | onLoad(option) {}, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | isDisabledSubmitButton: false, |
| | | |
| | | topContent: [], //æ«æä¿å
»å·¥ä½æå¸¦åºæ¥çå
容 |
| | | centerContent: [], //ä¿å
»é¡¹ç®å
容 |
| | | scanContent: '', //æ«ææ«åºæ¥çå¼ |
| | | radioValue: '', //åéæ¡çå¼ |
| | | resultValue: '', //ä¿å
»ç»æå¼ |
| | | inputBoxValue: '', //è¾å
¥æ¡å¼ |
| | | |
| | | selectValueBZ: '', //æ åéæ©çå¼ |
| | | selectRangeBZ: [], //æ åéæ©ç䏿é项 |
| | | title: 0, |
| | | |
| | | selectValue: 'M', |
| | | selectRange: [{ |
| | | value: 'Y', |
| | | text: 'å¹´' |
| | | }, { |
| | | value: 'S', |
| | | text: 'å£' |
| | | }, { |
| | | value: 'M', |
| | | text: 'æ' |
| | | }, { |
| | | value: 'W', |
| | | text: 'å¨' |
| | | }, ] |
| | | |
| | | radioValue: '', |
| | | |
| | | purchorderArr: [], |
| | | |
| | | purchorderArrAll: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | mounted() { |
| | | this.init() |
| | | |
| | | this.getRepairScanDeviceQrCodeData('111') |
| | | |
| | | this.getEqpPermissions() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | selectChange(val) { |
| | | changeInputBoxValue(val) { |
| | | this.purchorderArr = this.purchorderArrAll.filter((p) => { |
| | | return p.code.indexOf(val) !== -1 |
| | | }) |
| | | |
| | | |
| | | if (this.purchorderArr.length > 0) { |
| | | this.radioValue = this.purchorderArr[0].code |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | inputBoxValueClear() { |
| | | this.inputBoxValue = '' |
| | | }, |
| | | radioValueClick(val) { |
| | | console.log(val) |
| | | this.radioValue = val |
| | | }, |
| | | selectChangeBZ(val) { |
| | | console.log(val, 1) |
| | | this.selectValueBZ = val |
| | | this.getRepairSelectScanDeviceQrCodeItem(this.radioValue, this.selectValueBZ) |
| | | navigateTo() { |
| | | uni.navigateTo({ |
| | | url: './dqby2?code=' + this.radioValue |
| | | }); |
| | | }, |
| | | // æ«ç å·¥ä½ çæ«ç æ¡ç¹å» |
| | | |
| | | // æ«ç æ¡ç¹å» |
| | | topScanClick() { |
| | | let that = this; |
| | | |
| | |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | that.scanContent = res.result; |
| | | let flag = false |
| | | that.topContent.forEach(item => { |
| | | if (item.code === res.result) { |
| | | flag = true |
| | | } |
| | | }) |
| | | if (flag) { |
| | | that.$u.toast('æ¤æ¡ç å·²æ«æï¼å·²å¨å表ä¸ï¼') |
| | | } else { |
| | | //å¤çæ«ç äºä»¶ |
| | | that.getRepairScanDeviceQrCodeData(that.scanContent); |
| | | } |
| | | that.changeInputBoxValue(that.scanContent); |
| | | }, |
| | | complete: function(res) { |
| | | |
| | |
| | | }); |
| | | }, |
| | | |
| | | // ä¿å
»é¡¹ç®å
容 çæ«ç æ¡ç¹å» |
| | | centerScanClick(val) { |
| | | 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; |
| | | async getEqpPermissions() { |
| | | const res = await EqpPermissions() |
| | | |
| | | this.purchorderArrAll = res.data |
| | | |
| | | if (res.result === val) { |
| | | that.centerContent.find(item => item.code === val).isDisabled = false |
| | | that.centerContent.find(item => item.code === val).isOK = 'OK' |
| | | this.purchorderArr = res.data |
| | | |
| | | if (that.centerContent.every(r => r.isOK === 'OK')) { |
| | | that.resultValue = 'OK' |
| | | } |
| | | if (that.centerContent.some(r => r.isOK === 'NG')) { |
| | | that.resultValue = 'NG' |
| | | } |
| | | if (that.centerContent.some(r => r.isOK === '')) { |
| | | that.resultValue = '' |
| | | } |
| | | this.title = res.data.length |
| | | |
| | | that.$forceUpdate() |
| | | } else { |
| | | uni.$u.toast('ææ«æ¡ç ä¸ç¹æ£é¨ä½ä¸ç¬¦åï¼') |
| | | } |
| | | this.radioValue = res.data[0].code |
| | | |
| | | |
| | | //å¤çæ«ç äºä»¶ |
| | | // that.SearchBarcode(); |
| | | }, |
| | | complete: function(res) {}, |
| | | fail: function(res) {} |
| | | |
| | | }); |
| | | }, |
| | | |
| | | // è·åä¿å
»å·¥ä½ |
| | | async getRepairScanDeviceQrCodeData(val) { |
| | | const data = { |
| | | eqpcode: val |
| | | } |
| | | |
| | | const res = await RepairScanDeviceQrCodeData(data) |
| | | |
| | | if (res.code === '200' && res.data[0].eapmai_code !== null) { //表示ç»å®äºæ å |
| | | this.topContent.unshift(res.data[0]) |
| | | this.radioValue = res.data[0].code |
| | | // this.selectValue = res.data[0].main_cycle |
| | | // this.getRepairSelectScanDeviceQrCodeItem(res.data[0].code, res.data[0].eapmai_code) |
| | | |
| | | this.getRepairScanDeviceTemp(res.data[0].code) |
| | | } else if (res.code === '200' && res.data[0].eapmai_code === null) { |
| | | uni.$u.toast('å½åè®¾å¤æªè®¾ç½®ç¹æ£æ åç»å®ç¹æ£é¡¹ç®ï¼') |
| | | // this.selectValueBZ = '' |
| | | // this.centerContent = [] |
| | | // this.$forceUpdate() |
| | | } |
| | | // else if (res.code === '200') { |
| | | // uni.$u.toast('å½åè®¾å¤æªè®¾ç½®ç¹æ£æ åç»å®ç¹æ£é¡¹ç®ï¼') |
| | | // this.$forceUpdate() |
| | | // } |
| | | }, |
| | | // è·åä¿å
»æ å |
| | | async getRepairScanDeviceTemp(eqpcode) { |
| | | const res = await RepairScanDeviceTemp({ |
| | | eqpcode |
| | | }) |
| | | |
| | | this.selectRangeBZ = res.data.map(({ |
| | | code, |
| | | name |
| | | }) => ({ |
| | | text: name, |
| | | value: code |
| | | })) |
| | | |
| | | this.selectValueBZ = this.selectRangeBZ[0].value |
| | | |
| | | this.getRepairSelectScanDeviceQrCodeItem(eqpcode, this.selectValueBZ) |
| | | }, |
| | | // è·åä¿å
»é¡¹ç®å
容 |
| | | async getRepairSelectScanDeviceQrCodeItem(eqpcode, repartempcode) { |
| | | |
| | | const data = { |
| | | eqpcode, |
| | | repartempcode |
| | | } |
| | | |
| | | const res = await RepairSelectScanDeviceQrCodeItem(data) |
| | | |
| | | if (res.code === '200') { |
| | | this.centerContent = res.data |
| | | |
| | | this.centerContent.forEach(item => { |
| | | item.inputValue = '' |
| | | item.isDisabled = item.isscan === 'Y' |
| | | item.isOK = item.isscan !== 'Y' ? 'OK' : '' |
| | | }) |
| | | |
| | | if (this.centerContent.every(r => r.isOK === 'OK')) { |
| | | this.resultValue = 'OK' |
| | | } |
| | | if (this.centerContent.some(r => r.isOK === 'NG')) { |
| | | this.resultValue = 'NG' |
| | | } |
| | | if (this.centerContent.some(r => r.isOK === '')) { |
| | | this.resultValue = '' |
| | | } |
| | | |
| | | this.radioValue = eqpcode |
| | | this.selectValue = this.centerContent[0].main_cycle |
| | | this.$forceUpdate() |
| | | } else if (res.code === '300') { |
| | | this.selectValueBZ = '' |
| | | this.centerContent = [] |
| | | this.$forceUpdate() |
| | | } |
| | | |
| | | |
| | | }, |
| | | // åéæé®ç¹å» |
| | | groupChange(val) { |
| | | this.radioValue = val |
| | | this.$forceUpdate() |
| | | // this.getRepairSelectScanDeviceQrCodeItem(val, this.topContent.find(i => i.code === val).eapmai_code) |
| | | this.getRepairScanDeviceTemp(val) |
| | | }, |
| | | |
| | | // é¨ä½æ£å¸¸ å¼å¸¸æé®ç¹å» |
| | | bwClick(item, val) { |
| | | item.isOK = val |
| | | if (this.centerContent.every(item => item.isOK !== '')) { |
| | | if (this.centerContent.every(item => item.isOK === 'OK')) { |
| | | this.resultValue = 'OK' |
| | | } else { |
| | | this.resultValue = 'NG' |
| | | } |
| | | } |
| | | this.$forceUpdate() //强å¶è§å¾æ´æ° |
| | | }, |
| | | // ç¹æ£ç»æç¹å» |
| | | resultClick(val) { |
| | | this.resultValue = val |
| | | this.$forceUpdate() //强å¶è§å¾æ´æ° |
| | | }, |
| | | // 确认æäº¤æé® |
| | | async submit() { |
| | | const children = [] |
| | | |
| | | |
| | | |
| | | this.centerContent.forEach(item => { |
| | | children.push({ |
| | | seq: item.seq, |
| | | itemcode: item.code, |
| | | cycle: item.main_cycle, |
| | | value: item.inputValue, |
| | | result: item.isOK |
| | | }) |
| | | |
| | | }) |
| | | const data = { |
| | | code: this.topContent.find(item => item.code === this.radioValue).code, |
| | | name: this.topContent.find(item => item.code === this.radioValue).name, |
| | | // standcode: this.topContent.find(item => item.code === this.radioValue).eapmai_code, |
| | | standcode: this.selectValueBZ, |
| | | result: this.resultValue, |
| | | children: children |
| | | } |
| | | // console.log(data) |
| | | this.isDisabledSubmitButton = true |
| | | const res = await AppDeviceRepairSave(data, uni.getStorageSync("username"), this.selectValue) |
| | | if (res.code === '200') { |
| | | uni.$u.toast('æäº¤æåï¼') |
| | | this.isDisabledSubmitButton = false |
| | | this.topContent.forEach((item, index) => { |
| | | if (item.code === this.radioValue) { |
| | | this.topContent.splice(index, 1) |
| | | } |
| | | }) |
| | | this.radioValue = this.topContent[0].code |
| | | if (this.radioValue.toString().length > 0) { |
| | | this.getRepairScanDeviceTemp(this.radioValue) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | ::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: 1040rpx; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | ::v-deep .u-radio-label--right { |
| | | height: 90rpx; |
| | | line-height: 90rpx; |
| | | width: 92%; |
| | | margin-left: 4%; |
| | | // padding: 0 50rpx; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="宿ä¿å
»"></page-nav> |
| | | |
| | | |
| | | <!-- <view v-show="topContent.length===0"> |
| | | <div class="sacnBody"> |
| | | <div class="scanImg" @click="topScanClick"></div> |
| | | <div class="scanText">æ«æä¿å
»å·¥ä½</div> |
| | | </div> |
| | | </view> --> |
| | | |
| | | |
| | | <view v-show="topContent.length!==0"> |
| | | <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="28"></u-icon> |
| | | </view> --> |
| | | |
| | | </view> |
| | | |
| | | <view class="marginLeft20 marginRight20" style="max-height: 180rpx;overflow:scroll;"> |
| | | <u-radio-group v-model="radioValue" class="flex_column"> |
| | | <view class="marginBottom20 flex_between" @click="groupChange(item.code)" |
| | | v-for="item in topContent" :key="item.code"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>å·¥ä½ç¼ç ï¼</view> |
| | | <view>å·¥ä½åç§°ï¼</view> |
| | | <view>ç产车é´ï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{item.code}}</view> |
| | | <view>{{item.name}}</view> |
| | | <view>{{item.wksp_name}}</view> |
| | | </view> |
| | | </view> |
| | | <u-radio size='20' :key="item.code" :name="item.code" |
| | | @change="groupChange(item.code)" activeColor="red"></u-radio> |
| | | </view> |
| | | </u-radio-group> |
| | | </view> |
| | | |
| | | </view> |
| | | <u-gap height="12" bgColor="#eff0f1"></u-gap> |
| | | <view class="head" style="height:86rpx;"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | ä¿å
»æ å |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginRight20 marginTop10" style="width: 200rpx;"> |
| | | <!-- <u-icon name="scan" @click="topScanClick" color="red" size="56"></u-icon> --> |
| | | <uni-data-select v-model="selectValueBZ" :clear="false" :localdata="selectRangeBZ" |
| | | @change="selectChangeBZ"> |
| | | </uni-data-select> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | <u-gap height="12" bgColor="#eff0f1"></u-gap> |
| | | |
| | | <view class="head"> |
| | | |
| | | <view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | ä¿å
»é¡¹ç®å
容 |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginRight20" style="width: 200rpx;"> |
| | | <uni-data-select v-model="selectValue" :clear="false" :localdata="selectRange" |
| | | @change="selectChange"> |
| | | </uni-data-select> |
| | | </view> |
| | | |
| | | </view> |
| | | <view :style="{maxHeight:(($DeviceInformation.screenHeight-550)*3)+'rpx',overflow: 'scroll'}"> |
| | | <!-- <view :style="{maxHeight:'1000rpx',overflow: 'scroll'}"> --> |
| | | <view class="center_border flex_column" style="margin: 10rpx;" v-for="item in centerContent" |
| | | :key="item.code"> |
| | | |
| | | <view class="flex_between marginBottom10"> |
| | | <view class="center_title">{{item.name}}</view> |
| | | <view class="marginRight20" v-if="item.isscan==='Y'"> |
| | | <u-icon name="scan" @click="centerScanClick(item.code)" color="red" size="28"> |
| | | </u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="flex_between marginBottom10"> |
| | | <view class='inputClass marginTop10'> |
| | | <u--input :disabled='item.isDisabled' placeholder="请è¾å
¥" border="surround" |
| | | v-model="item.inputValue"></u--input> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex_center"> |
| | | <u-button type="primary" :plain="item.isOK!=='OK'" :disabled="item.isDisabled" |
| | | style="height: 60rpx;" text="æ£å¸¸" @click="bwClick(item,'OK')"> |
| | | </u-button> |
| | | <u-button type="warning" :plain="item.isOK!=='NG'" :disabled="item.isDisabled" |
| | | style="height: 60rpx;margin:0 5rpx;" text="å¼å¸¸" @click="bwClick(item,'NG')"> |
| | | </u-button> |
| | | </view> |
| | | </view> |
| | | <view class="titleFont"> |
| | | {{item.chkdesc}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="footer"> |
| | | <view class="head_block" style="align-items: center;padding: 0 23rpx;height: 100rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | ä¿å
ȍȾ |
| | | </view> |
| | | </view> |
| | | <view class="flex_center"> |
| | | <u-button type="primary" :plain="resultValue!=='OK'" style="height: 60rpx;" |
| | | :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0" |
| | | text="æ£å¸¸" @click="resultClick('OK')"></u-button> |
| | | <u-button type="warning" :plain="resultValue!=='NG'" style="margin-left: 20rpx;height: 60rpx;" |
| | | :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0" |
| | | text="å¼å¸¸" @click="resultClick('NG')"></u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | <u-button size="large" :loading="isDisabledSubmitButton" loadingText="æ£å¨æäº¤,请ç¨ç..." type="primary" |
| | | @click="submit" :disabled="resultValue===''" text="确认æäº¤"> |
| | | </u-button> |
| | | |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | |
| | | |
| | | <scan-code></scan-code> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | RepairScanDeviceQrCodeData, |
| | | RepairSelectScanDeviceQrCodeItem, |
| | | RepairScanDeviceTemp, |
| | | AppDeviceRepairSave |
| | | } from '../../config/api.js' |
| | | import scanCode from '@/components/scan-code/scan-code.vue' |
| | | export default { |
| | | components: { |
| | | scanCode |
| | | }, |
| | | onLoad(option) { |
| | | const _this = this |
| | | uni.$off('scancodedate') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scancodedate', function(content) { |
| | | console.log("æ«æå°çå
容为:", content) |
| | | _this.getRepairScanDeviceQrCodeData(content) |
| | | }) |
| | | _this.getRepairScanDeviceQrCodeData(option.code) |
| | | }, |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | data() { |
| | | return { |
| | | isDisabledSubmitButton: false, |
| | | |
| | | topContent: [], //æ«æä¿å
»å·¥ä½æå¸¦åºæ¥çå
容 |
| | | centerContent: [], //ä¿å
»é¡¹ç®å
容 |
| | | scanContent: '', //æ«ææ«åºæ¥çå¼ |
| | | radioValue: '', //åéæ¡çå¼ |
| | | resultValue: '', //ä¿å
»ç»æå¼ |
| | | |
| | | selectValueBZ: '', //æ åéæ©çå¼ |
| | | selectRangeBZ: [], //æ åéæ©ç䏿é项 |
| | | |
| | | selectValue: 'M', |
| | | selectRange: [{ |
| | | value: 'Y', |
| | | text: 'å¹´' |
| | | }, { |
| | | value: 'S', |
| | | text: 'å£' |
| | | }, { |
| | | value: 'M', |
| | | text: 'æ' |
| | | }, { |
| | | value: 'W', |
| | | text: 'å¨' |
| | | }, ] |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | |
| | | // this.getRepairScanDeviceQrCodeData('111') |
| | | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | selectChange(val) { |
| | | console.log(val) |
| | | }, |
| | | selectChangeBZ(val) { |
| | | console.log(val, 1) |
| | | this.selectValueBZ = val |
| | | this.getRepairSelectScanDeviceQrCodeItem(this.radioValue, this.selectValueBZ) |
| | | }, |
| | | // æ«ç å·¥ä½ çæ«ç æ¡ç¹å» |
| | | 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.scanContent = res.result; |
| | | let flag = false |
| | | that.topContent.forEach(item => { |
| | | if (item.code === res.result) { |
| | | flag = true |
| | | } |
| | | }) |
| | | if (flag) { |
| | | that.$u.toast('æ¤æ¡ç å·²æ«æï¼å·²å¨å表ä¸ï¼') |
| | | } else { |
| | | //å¤çæ«ç äºä»¶ |
| | | that.getRepairScanDeviceQrCodeData(that.scanContent); |
| | | } |
| | | }, |
| | | complete: function(res) { |
| | | |
| | | }, |
| | | fail: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | |
| | | // ä¿å
»é¡¹ç®å
容 çæ«ç æ¡ç¹å» |
| | | centerScanClick(val) { |
| | | 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; |
| | | |
| | | |
| | | if (res.result === val) { |
| | | that.centerContent.find(item => item.code === val).isDisabled = false |
| | | that.centerContent.find(item => item.code === val).isOK = 'OK' |
| | | |
| | | if (that.centerContent.every(r => r.isOK === 'OK')) { |
| | | that.resultValue = 'OK' |
| | | } |
| | | if (that.centerContent.some(r => r.isOK === 'NG')) { |
| | | that.resultValue = 'NG' |
| | | } |
| | | if (that.centerContent.some(r => r.isOK === '')) { |
| | | that.resultValue = '' |
| | | } |
| | | |
| | | that.$forceUpdate() |
| | | } else { |
| | | uni.$u.toast('ææ«æ¡ç ä¸ç¹æ£é¨ä½ä¸ç¬¦åï¼') |
| | | } |
| | | |
| | | |
| | | //å¤çæ«ç äºä»¶ |
| | | // that.SearchBarcode(); |
| | | }, |
| | | complete: function(res) {}, |
| | | fail: function(res) {} |
| | | |
| | | }); |
| | | }, |
| | | |
| | | // è·åä¿å
»å·¥ä½ |
| | | async getRepairScanDeviceQrCodeData(val) { |
| | | const data = { |
| | | eqpcode: val |
| | | } |
| | | |
| | | const res = await RepairScanDeviceQrCodeData(data) |
| | | |
| | | if (res.code === '200' && res.data[0].eapmai_code !== null) { //表示ç»å®äºæ å |
| | | this.topContent.unshift(res.data[0]) |
| | | this.radioValue = res.data[0].code |
| | | // this.selectValue = res.data[0].main_cycle |
| | | // this.getRepairSelectScanDeviceQrCodeItem(res.data[0].code, res.data[0].eapmai_code) |
| | | |
| | | this.getRepairScanDeviceTemp(res.data[0].code) |
| | | } else if (res.code === '200' && res.data[0].eapmai_code === null) { |
| | | uni.$u.toast('å½åè®¾å¤æªè®¾ç½®ç¹æ£æ åç»å®ç¹æ£é¡¹ç®ï¼') |
| | | // this.selectValueBZ = '' |
| | | // this.centerContent = [] |
| | | // this.$forceUpdate() |
| | | } |
| | | // else if (res.code === '200') { |
| | | // uni.$u.toast('å½åè®¾å¤æªè®¾ç½®ç¹æ£æ åç»å®ç¹æ£é¡¹ç®ï¼') |
| | | // this.$forceUpdate() |
| | | // } |
| | | }, |
| | | // è·åä¿å
»æ å |
| | | async getRepairScanDeviceTemp(eqpcode) { |
| | | const res = await RepairScanDeviceTemp({ |
| | | eqpcode |
| | | }) |
| | | |
| | | this.selectRangeBZ = res.data.map(({ |
| | | code, |
| | | name |
| | | }) => ({ |
| | | text: name, |
| | | value: code |
| | | })) |
| | | |
| | | this.selectValueBZ = this.selectRangeBZ[0].value |
| | | |
| | | this.getRepairSelectScanDeviceQrCodeItem(eqpcode, this.selectValueBZ) |
| | | }, |
| | | // è·åä¿å
»é¡¹ç®å
容 |
| | | async getRepairSelectScanDeviceQrCodeItem(eqpcode, repartempcode) { |
| | | |
| | | const data = { |
| | | eqpcode, |
| | | repartempcode |
| | | } |
| | | |
| | | const res = await RepairSelectScanDeviceQrCodeItem(data) |
| | | |
| | | if (res.code === '200') { |
| | | this.centerContent = res.data |
| | | |
| | | this.centerContent.forEach(item => { |
| | | item.inputValue = '' |
| | | item.isDisabled = item.isscan === 'Y' |
| | | item.isOK = item.isscan !== 'Y' ? 'OK' : '' |
| | | }) |
| | | |
| | | if (this.centerContent.every(r => r.isOK === 'OK')) { |
| | | this.resultValue = 'OK' |
| | | } |
| | | if (this.centerContent.some(r => r.isOK === 'NG')) { |
| | | this.resultValue = 'NG' |
| | | } |
| | | if (this.centerContent.some(r => r.isOK === '')) { |
| | | this.resultValue = '' |
| | | } |
| | | |
| | | this.radioValue = eqpcode |
| | | this.selectValue = this.centerContent[0].main_cycle |
| | | this.$forceUpdate() |
| | | } else if (res.code === '300') { |
| | | this.selectValueBZ = '' |
| | | this.centerContent = [] |
| | | this.$forceUpdate() |
| | | } |
| | | |
| | | |
| | | }, |
| | | // åéæé®ç¹å» |
| | | groupChange(val) { |
| | | this.radioValue = val |
| | | this.$forceUpdate() |
| | | // this.getRepairSelectScanDeviceQrCodeItem(val, this.topContent.find(i => i.code === val).eapmai_code) |
| | | this.getRepairScanDeviceTemp(val) |
| | | }, |
| | | |
| | | // é¨ä½æ£å¸¸ å¼å¸¸æé®ç¹å» |
| | | bwClick(item, val) { |
| | | item.isOK = val |
| | | if (this.centerContent.every(item => item.isOK !== '')) { |
| | | if (this.centerContent.every(item => item.isOK === 'OK')) { |
| | | this.resultValue = 'OK' |
| | | } else { |
| | | this.resultValue = 'NG' |
| | | } |
| | | } |
| | | this.$forceUpdate() //强å¶è§å¾æ´æ° |
| | | }, |
| | | // ç¹æ£ç»æç¹å» |
| | | resultClick(val) { |
| | | this.resultValue = val |
| | | this.$forceUpdate() //强å¶è§å¾æ´æ° |
| | | }, |
| | | // 确认æäº¤æé® |
| | | async submit() { |
| | | const children = [] |
| | | |
| | | |
| | | |
| | | this.centerContent.forEach(item => { |
| | | children.push({ |
| | | seq: item.seq, |
| | | itemcode: item.code, |
| | | cycle: item.main_cycle, |
| | | value: item.inputValue, |
| | | result: item.isOK |
| | | }) |
| | | |
| | | }) |
| | | const data = { |
| | | code: this.topContent.find(item => item.code === this.radioValue).code, |
| | | name: this.topContent.find(item => item.code === this.radioValue).name, |
| | | // standcode: this.topContent.find(item => item.code === this.radioValue).eapmai_code, |
| | | standcode: this.selectValueBZ, |
| | | result: this.resultValue, |
| | | children: children |
| | | } |
| | | // console.log(data) |
| | | this.isDisabledSubmitButton = true |
| | | const res = await AppDeviceRepairSave(data, uni.getStorageSync("username"), this.selectValue) |
| | | if (res.code === '200') { |
| | | uni.$u.toast('æäº¤æåï¼') |
| | | this.isDisabledSubmitButton = false |
| | | this.topContent.forEach((item, index) => { |
| | | if (item.code === this.radioValue) { |
| | | // this.topContent.splice(index, 1) |
| | | |
| | | // let prevPage = getCurrentPages()[getCurrentPages() |
| | | // .length - |
| | | // 2]; // ä¸ä¸é¡µé¢å®ä¾ |
| | | // prevPage.$vm |
| | | // .changeInputBoxValue('') // è°ç¨ä¸ä¸é¡µ å®ä¹çæ¹æ³ |
| | | |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1, //è¿å屿°ï¼2åä¸ä¸é¡µ |
| | | }) |
| | | }, 1000) |
| | | |
| | | |
| | | } |
| | | }) |
| | | this.radioValue = this.topContent[0].code |
| | | if (this.radioValue.toString().length > 0) { |
| | | this.getRepairScanDeviceTemp(this.radioValue) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| | |
| | | <view> |
| | | <page-nav title="æ¥å¸¸ç¹æ£"></page-nav> |
| | | |
| | | <!-- <u-notify ref="uNotify"></u-notify> --> |
| | | |
| | | <view v-show="topContent.length===0"> |
| | | <view v-if="purchorderArrAll.length>0"> |
| | | <!-- <view class="mainContent" :style="{maxHeight: '1340rpx',overflow: 'scroll',padding:0}"> --> |
| | | |
| | | <!-- #ifdef H5 --> |
| | | <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> |
| | | <!-- #endif --> |
| | | |
| | | <!-- #ifdef APP-PLUS --> |
| | | <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> |
| | | <!-- #endif --> |
| | | |
| | | |
| | | <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='18' :name='item.code' :key="item.code" |
| | | :label="item.code+'/'+item.name"></u-radio> |
| | | </view> |
| | | <u-line v-if="index!==purchorderArr.length-1" color="#2979ff"></u-line> |
| | | </view> |
| | | </u-radio-group> |
| | | |
| | | <view class="footer" style="min-height:62rpx;"> |
| | | <u-button type="primary" size='large' :hairline="true" @click="navigateTo" text="ä¸ä¸æ¥"></u-button> |
| | | </view> |
| | | <!-- </view> --> |
| | | </view> |
| | | |
| | | |
| | | <view v-if="purchorderArrAll.length===0"> |
| | | <div class="sacnBody"> |
| | | <div class="scanImg" @click="topScanClick"></div> |
| | | <div class="scanText">æ«æç¹æ£å·¥ä½</div> |
| | | <div class="boxImg"></div> |
| | | <div class="scanText">ææ è®¾å¤/å·¥ä½</div> |
| | | </div> |
| | | </view> |
| | | |
| | | |
| | | <view v-show="topContent.length!==0"> |
| | | <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="28"></u-icon> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view class="marginLeft20 marginRight20" style="max-height: 180rpx;overflow:auto;"> |
| | | <u-radio-group v-model="radioValue" class="flex_column"> |
| | | <view class="marginBottom20 flex_between" @click="groupChange(item.code)" |
| | | v-for="item in topContent" :key="item.code"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>å·¥ä½ç¼ç ï¼</view> |
| | | <view>å·¥ä½åç§°ï¼</view> |
| | | <view>ç产车é´ï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{item.code}}</view> |
| | | <view>{{item.name}}</view> |
| | | <view>{{item.wksp_name}}</view> |
| | | </view> |
| | | </view> |
| | | <u-radio style="line-height: 44rpx;" size='20' :key="item.code" :name="item.code" |
| | | @change="groupChange(item.code)" activeColor="red"></u-radio> |
| | | </view> |
| | | </u-radio-group> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head" style="height:82rpx;"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | ç¹æ£æ å |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginRight20 marginTop10" style="width: 200rpx;"> |
| | | <!-- <u-icon name="scan" @click="topScanClick" color="red" size="56"></u-icon> --> |
| | | <uni-data-select v-model="selectValueBZ" :clear="false" :localdata="selectRangeBZ" |
| | | @change="selectChangeBZ"> |
| | | </uni-data-select> |
| | | </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"> |
| | | ç¹æ£é¡¹ç®å
容 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <view :style="{maxHeight:(($DeviceInformation.screenHeight-530)*3)+'rpx',overflow: 'scroll'}"> --> |
| | | <view :style="{maxHeight:'1000rpx',overflow: 'scroll'}"> |
| | | |
| | | <view class="center_border flex_column" style="margin: 10rpx;" v-for="item in centerContent" |
| | | :key="item.code"> |
| | | |
| | | <view class="flex_between marginBottom10"> |
| | | <view class="center_title">{{item.name}}</view> |
| | | <view class="marginRight20" v-if="item.isscan==='Y'"> |
| | | <u-icon name="scan" @click="centerScanClick(item.code)" color="red" size="28"> |
| | | </u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="flex_between marginBottom10"> |
| | | <view class='inputClass marginTop10'> |
| | | <u--input :disabled='item.isDisabled' placeholder="请è¾å
¥" border="surround" |
| | | v-model="item.inputValue"></u--input> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex_center"> |
| | | <u-button type="primary" :plain="item.isOK!=='OK'" :disabled="item.isDisabled" |
| | | style="height: 60rpx;" text="æ£å¸¸" @click="bwClick(item,'OK')"> |
| | | </u-button> |
| | | <u-button type="warning" :plain="item.isOK!=='NG'" :disabled="item.isDisabled" |
| | | style="height: 60rpx;margin:0 5rpx;" text="å¼å¸¸" @click="bwClick(item,'NG')"> |
| | | </u-button> |
| | | </view> |
| | | </view> |
| | | <view class="titleFont"> |
| | | {{item.chkdesc}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="footer" style=""> |
| | | |
| | | <view class="head_block" style="align-items: center;padding: 0 23rpx;height: 100rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | ç¹æ£ç»æ |
| | | </view> |
| | | </view> |
| | | <view class="flex_center"> |
| | | <u-button type="primary" :plain="resultValue!=='OK'" style="height: 60rpx;" |
| | | :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0" |
| | | text="æ£å¸¸" @click="resultClick('OK')"></u-button> |
| | | <u-button type="warning" :plain="resultValue!=='NG'" style="margin-left: 20rpx;height: 60rpx;" |
| | | :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0" |
| | | text="å¼å¸¸" @click="resultClick('NG')"></u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <u-button size="large" :loading="isDisabledSubmitButton" loadingText="æ£å¨æäº¤,请ç¨ç..." type="primary" |
| | | @click="submit" :disabled="resultValue===''" text="确认æäº¤"> |
| | | </u-button> |
| | | |
| | | </view> |
| | | |
| | | |
| | | |
| | | </view> |
| | | |
| | | <scan-code></scan-code> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | CheckScanDeviceQrCodeData, |
| | | SelectScanDeviceQrCodeItem, |
| | | CheckScanDeviceTemp, |
| | | AppDeviceCheckSave |
| | | } from '../../config/api.js' |
| | | import scanCode from '@/components/scan-code/scan-code.vue' |
| | | EqpPermissions |
| | | } from '../../config/api.js'; |
| | | export default { |
| | | components: { |
| | | scanCode |
| | | }, |
| | | onLoad(option) { |
| | | onLoad(option) {}, |
| | | |
| | | const _this = this |
| | | uni.$off('scancodedate') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scancodedate', function(content) { |
| | | console.log("æ«æå°çå
容为:", content) |
| | | _this.getCheckScanDeviceQrCodeData(content) |
| | | }) |
| | | |
| | | }, |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | isDisabledSubmitButton: false, |
| | | |
| | | selectValueBZ: '', |
| | | selectRangeBZ: [], |
| | | inputBoxValue: '', //è¾å
¥æ¡å¼ |
| | | |
| | | topContent: [], //æ«æç¹æ£å·¥ä½æå¸¦åºæ¥çå
容 |
| | | centerContent: [], //ç¹æ£é¡¹ç®å
容 |
| | | scanContent: '', //æ«ææ«åºæ¥çå¼ |
| | | radioValue: '', //åéæ¡çå¼ |
| | | resultValue: '', //ç¹æ£ç»æå¼ |
| | | title: 0, |
| | | |
| | | |
| | | radioValue: '', |
| | | |
| | | purchorderArr: [], |
| | | |
| | | purchorderArrAll: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | mounted() { |
| | | this.init() |
| | | |
| | | // this.getCheckScanDeviceQrCodeData('111') |
| | | |
| | | this.getEqpPermissions() |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | // æ«ç ç¹æ£å·¥ä½ çæ«ç æ¡ç¹å» |
| | | changeInputBoxValue(val) { |
| | | |
| | | this.purchorderArr = this.purchorderArrAll.filter((p) => { |
| | | return p.code.indexOf(val) !== -1 |
| | | }) |
| | | |
| | | |
| | | if (this.purchorderArr.length > 0) { |
| | | this.radioValue = this.purchorderArr[0].code |
| | | } |
| | | |
| | | |
| | | }, |
| | | inputBoxValueClear() { |
| | | this.inputBoxValue = '' |
| | | }, |
| | | radioValueClick(val) { |
| | | console.log(val) |
| | | this.radioValue = val |
| | | }, |
| | | navigateTo() { |
| | | uni.navigateTo({ |
| | | url: './rcdj2?code=' + this.radioValue |
| | | }); |
| | | }, |
| | | |
| | | // æ«ç æ¡ç¹å» |
| | | topScanClick() { |
| | | let that = this; |
| | | |
| | |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | that.scanContent = res.result; |
| | | let flag = false |
| | | that.topContent.forEach(item => { |
| | | if (item.code === res.result) { |
| | | flag = true |
| | | } |
| | | }) |
| | | if (flag) { |
| | | that.$u.toast('æ¤æ¡ç å·²æ«æï¼å·²å¨å表ä¸ï¼') |
| | | } else { |
| | | //å¤çæ«ç äºä»¶ |
| | | that.getCheckScanDeviceQrCodeData(that.scanContent); |
| | | } |
| | | that.changeInputBoxValue(that.scanContent); |
| | | }, |
| | | complete: function(res) { |
| | | |
| | |
| | | }); |
| | | }, |
| | | |
| | | // ç¹æ£é¡¹ç®å
容 çæ«ç æ¡ç¹å» |
| | | centerScanClick(val) { |
| | | 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; |
| | | async getEqpPermissions() { |
| | | const res = await EqpPermissions() |
| | | |
| | | this.purchorderArrAll = res.data |
| | | |
| | | this.purchorderArr = res.data |
| | | |
| | | this.title = res.data.length |
| | | |
| | | this.radioValue = res.data[0].code |
| | | |
| | | |
| | | if (res.result === val) { |
| | | that.centerContent.find(item => item.code === val).isDisabled = false |
| | | that.centerContent.find(item => item.code === val).isOK = 'OK' |
| | | |
| | | if (that.centerContent.every(r => r.isOK === 'OK')) { |
| | | that.resultValue = 'OK' |
| | | } |
| | | if (that.centerContent.some(r => r.isOK === 'NG')) { |
| | | that.resultValue = 'NG' |
| | | } |
| | | if (that.centerContent.some(r => r.isOK === '')) { |
| | | that.resultValue = '' |
| | | } |
| | | |
| | | |
| | | that.$forceUpdate() |
| | | } else { |
| | | uni.$u.toast('ææ«æ¡ç ä¸ç¹æ£é¨ä½ä¸ç¬¦åï¼') |
| | | } |
| | | |
| | | |
| | | //å¤çæ«ç äºä»¶ |
| | | // that.SearchBarcode(); |
| | | }, |
| | | complete: function(res) {}, |
| | | fail: function(res) {} |
| | | |
| | | }); |
| | | }, |
| | | |
| | | // è·åç¹æ£å·¥ä½ |
| | | async getCheckScanDeviceQrCodeData(val) { |
| | | const data = { |
| | | eqpcode: val |
| | | } |
| | | const res = await CheckScanDeviceQrCodeData(data) |
| | | |
| | | if (res.code === '200' && res.data[0].eqpchkmain_code !== null) { //表示ç»å®äºæ å |
| | | this.topContent.unshift(res.data[0]) |
| | | // console.log(res.data[0],222); |
| | | this.getCheckScanDeviceTemp(res.data[0].code) |
| | | } else if (res.code === '200' && res.data[0].eqpchkmain_code === null) { |
| | | uni.$u.toast('å½åè®¾å¤æªè®¾ç½®ç¹æ£æ åç»å®ç¹æ£é¡¹ç®ï¼') |
| | | } |
| | | |
| | | }, |
| | | // è·åç¹æ£æ å |
| | | async getCheckScanDeviceTemp(eqpcode) { |
| | | const res = await CheckScanDeviceTemp({ |
| | | eqpcode |
| | | }) |
| | | this.selectRangeBZ = res.data.map(({ |
| | | code, |
| | | name |
| | | }) => ({ |
| | | text: name, |
| | | value: code |
| | | })) |
| | | |
| | | this.selectValueBZ = this.selectRangeBZ[0].value |
| | | |
| | | this.getSelectScanDeviceQrCodeItem(eqpcode, this.selectValueBZ) |
| | | |
| | | }, |
| | | //ç¹æ£æ å䏿鿩æ¹å |
| | | selectChangeBZ(val) { |
| | | this.selectValueBZ = val |
| | | |
| | | this.getSelectScanDeviceQrCodeItem(this.radioValue, this.selectValueBZ) |
| | | }, |
| | | // è·åç¹æ£é¡¹ç®å
容 |
| | | async getSelectScanDeviceQrCodeItem(eqpcode, checktempcode) { |
| | | |
| | | const data = { |
| | | eqpcode, |
| | | checktempcode |
| | | } |
| | | const res = await SelectScanDeviceQrCodeItem(data) |
| | | |
| | | if (res.code === '200') { |
| | | this.centerContent = res.data |
| | | |
| | | this.centerContent.forEach(item => { |
| | | item.inputValue = '' |
| | | item.isDisabled = item.isscan === 'Y' |
| | | item.isOK = item.isscan !== 'Y' ? 'OK' : '' |
| | | }) |
| | | |
| | | if (this.centerContent.every(r => r.isOK === 'OK')) { |
| | | this.resultValue = 'OK' |
| | | } |
| | | if (this.centerContent.some(r => r.isOK === 'NG')) { |
| | | this.resultValue = 'NG' |
| | | } |
| | | if (this.centerContent.some(r => r.isOK === '')) { |
| | | this.resultValue = '' |
| | | } |
| | | |
| | | this.radioValue = eqpcode |
| | | this.$forceUpdate() |
| | | } |
| | | |
| | | |
| | | }, |
| | | // åéæé®ç¹å» |
| | | groupChange(val) { |
| | | this.radioValue = val |
| | | this.$forceUpdate() |
| | | this.getCheckScanDeviceTemp(val) |
| | | }, |
| | | |
| | | // é¨ä½æ£å¸¸ å¼å¸¸æé®ç¹å» |
| | | bwClick(item, val) { |
| | | item.isOK = val |
| | | if (this.centerContent.every(item => item.isOK !== '')) { |
| | | if (this.centerContent.every(item => item.isOK === 'OK')) { |
| | | this.resultValue = 'OK' |
| | | } else { |
| | | this.resultValue = 'NG' |
| | | } |
| | | } |
| | | this.$forceUpdate() //强å¶è§å¾æ´æ° |
| | | }, |
| | | // ç¹æ£ç»æç¹å» |
| | | resultClick(val) { |
| | | this.resultValue = val |
| | | this.$forceUpdate() //强å¶è§å¾æ´æ° |
| | | }, |
| | | // 确认æäº¤æé® |
| | | async submit() { |
| | | const children = [] |
| | | this.centerContent.forEach(item => { |
| | | children.push({ |
| | | seq: item.seq, |
| | | itemcode: item.code, |
| | | cycle: item.cycle, |
| | | value: item.inputValue, |
| | | result: item.isOK |
| | | }) |
| | | |
| | | }) |
| | | const data = { |
| | | code: this.topContent.find(item => item.code === this.radioValue).code, |
| | | name: this.topContent.find(item => item.code === this.radioValue).name, |
| | | // standcode: this.topContent.find(item => item.code === this.radioValue).eqpchkmain_code, |
| | | standcode: this.selectValueBZ, |
| | | result: this.resultValue, |
| | | children: children |
| | | } |
| | | |
| | | // console.log(data, 8); |
| | | |
| | | |
| | | this.isDisabledSubmitButton = true |
| | | const res = await AppDeviceCheckSave(uni.getStorageSync("username"), data) |
| | | if (res.code === '200') { |
| | | |
| | | // this.$refs.uNotify.show({ |
| | | // top: 160, |
| | | // type: 'primary', |
| | | // color: '#fff', |
| | | // bgColor: '#436df5', |
| | | // message: 'æäº¤æå!', |
| | | // duration: 1000 * 3, |
| | | // fontSize: 30, |
| | | // safeAreaInsetTop: false |
| | | // }) |
| | | uni.$u.toast('æäº¤æåï¼') |
| | | this.isDisabledSubmitButton = false |
| | | this.topContent.forEach((item, index) => { |
| | | if (item.code === this.radioValue) { |
| | | this.topContent.splice(index, 1) |
| | | } |
| | | }) |
| | | this.radioValue = this.topContent[0].code |
| | | if (this.radioValue.toString().length > 0) { |
| | | // this.getSelectScanDeviceQrCodeItem(this.radioValue, this.topContent.find(i => i.code === this |
| | | // .radioValue).eqpchkmain_code) |
| | | this.getCheckScanDeviceTemp(val) |
| | | } |
| | | |
| | | } else { |
| | | this.isDisabledSubmitButton = false |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | ::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: 1040rpx; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | ::v-deep .u-radio-label--right { |
| | | height: 90rpx; |
| | | line-height: 90rpx; |
| | | width: 92%; |
| | | margin-left: 4%; |
| | | // padding: 0 50rpx; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="æ¥å¸¸ç¹æ£"></page-nav> |
| | | |
| | | <!-- <u-notify ref="uNotify"></u-notify> --> |
| | | |
| | | <!-- <view v-show="topContent.length===0"> |
| | | <div class="sacnBody"> |
| | | <div class="scanImg" @click="topScanClick"></div> |
| | | <div class="scanText">æ«æç¹æ£å·¥ä½</div> |
| | | </div> |
| | | </view> --> |
| | | |
| | | |
| | | <view v-show="topContent.length!==0"> |
| | | <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="28"></u-icon> |
| | | </view> --> |
| | | |
| | | </view> |
| | | |
| | | <view class="marginLeft20 marginRight20" style="max-height: 180rpx;overflow:auto;"> |
| | | <u-radio-group v-model="radioValue" class="flex_column"> |
| | | <view class="marginBottom20 flex_between" @click="groupChange(item.code)" |
| | | v-for="item in topContent" :key="item.code"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>å·¥ä½ç¼ç ï¼</view> |
| | | <view>å·¥ä½åç§°ï¼</view> |
| | | <view>ç产车é´ï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{item.code}}</view> |
| | | <view>{{item.name}}</view> |
| | | <view>{{item.wksp_name}}</view> |
| | | </view> |
| | | </view> |
| | | <u-radio style="line-height: 44rpx;" size='20' :key="item.code" :name="item.code" |
| | | @change="groupChange(item.code)" activeColor="red"></u-radio> |
| | | </view> |
| | | </u-radio-group> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head" style="height:82rpx;"> |
| | | <view class="head_block"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | ç¹æ£æ å |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginRight20 marginTop10" style="width: 200rpx;"> |
| | | <!-- <u-icon name="scan" @click="topScanClick" color="red" size="56"></u-icon> --> |
| | | <uni-data-select v-model="selectValueBZ" :clear="false" :localdata="selectRangeBZ" |
| | | @change="selectChangeBZ"> |
| | | </uni-data-select> |
| | | </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"> |
| | | ç¹æ£é¡¹ç®å
容 |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view :style="{maxHeight:(($DeviceInformation.screenHeight-550)*3)+'rpx',overflow: 'scroll'}"> |
| | | <!-- <view :style="{maxHeight:'1000rpx',overflow: 'scroll'}"> --> |
| | | |
| | | <view class="center_border flex_column" style="margin: 10rpx;" v-for="item in centerContent" |
| | | :key="item.code"> |
| | | |
| | | <view class="flex_between marginBottom10"> |
| | | <view class="center_title">{{item.name}}</view> |
| | | <view class="marginRight20" v-if="item.isscan==='Y'"> |
| | | <u-icon name="scan" @click="centerScanClick(item.code)" color="red" size="28"> |
| | | </u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="flex_between marginBottom10"> |
| | | <view class='inputClass marginTop10'> |
| | | <u--input :disabled='item.isDisabled' placeholder="请è¾å
¥" border="surround" |
| | | v-model="item.inputValue"></u--input> |
| | | </view> |
| | | |
| | | |
| | | <view class="flex_center"> |
| | | <u-button type="primary" :plain="item.isOK!=='OK'" :disabled="item.isDisabled" |
| | | style="height: 60rpx;" text="æ£å¸¸" @click="bwClick(item,'OK')"> |
| | | </u-button> |
| | | <u-button type="warning" :plain="item.isOK!=='NG'" :disabled="item.isDisabled" |
| | | style="height: 60rpx;margin:0 5rpx;" text="å¼å¸¸" @click="bwClick(item,'NG')"> |
| | | </u-button> |
| | | </view> |
| | | </view> |
| | | <view class="titleFont"> |
| | | {{item.chkdesc}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="footer" style=""> |
| | | |
| | | <view class="head_block" style="align-items: center;padding: 0 23rpx;height: 100rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | ç¹æ£ç»æ |
| | | </view> |
| | | </view> |
| | | <view class="flex_center"> |
| | | <u-button type="primary" :plain="resultValue!=='OK'" style="height: 60rpx;" |
| | | :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0" |
| | | text="æ£å¸¸" @click="resultClick('OK')"></u-button> |
| | | <u-button type="warning" :plain="resultValue!=='NG'" style="margin-left: 20rpx;height: 60rpx;" |
| | | :disabled="centerContent.some(item=>item.isDisabled===true)||centerContent.length===0" |
| | | text="å¼å¸¸" @click="resultClick('NG')"></u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <u-button size="large" :loading="isDisabledSubmitButton" loadingText="æ£å¨æäº¤,请ç¨ç..." type="primary" |
| | | @click="submit" :disabled="resultValue===''" text="确认æäº¤"> |
| | | </u-button> |
| | | |
| | | </view> |
| | | |
| | | |
| | | |
| | | </view> |
| | | |
| | | <scan-code></scan-code> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | CheckScanDeviceQrCodeData, |
| | | SelectScanDeviceQrCodeItem, |
| | | CheckScanDeviceTemp, |
| | | AppDeviceCheckSave |
| | | } from '../../config/api.js' |
| | | import scanCode from '@/components/scan-code/scan-code.vue' |
| | | export default { |
| | | components: { |
| | | scanCode |
| | | }, |
| | | onLoad(option) { |
| | | |
| | | const _this = this |
| | | uni.$off('scancodedate') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scancodedate', function(content) { |
| | | console.log("æ«æå°çå
容为:", content) |
| | | _this.getCheckScanDeviceQrCodeData(content) |
| | | }) |
| | | _this.getCheckScanDeviceQrCodeData(option.code) |
| | | }, |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | data() { |
| | | return { |
| | | isDisabledSubmitButton: false, |
| | | |
| | | selectValueBZ: '', |
| | | selectRangeBZ: [], |
| | | |
| | | topContent: [], //æ«æç¹æ£å·¥ä½æå¸¦åºæ¥çå
容 |
| | | centerContent: [], //ç¹æ£é¡¹ç®å
容 |
| | | scanContent: '', //æ«ææ«åºæ¥çå¼ |
| | | radioValue: '', //åéæ¡çå¼ |
| | | resultValue: '', //ç¹æ£ç»æå¼ |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | |
| | | // this.getCheckScanDeviceQrCodeData('111') |
| | | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | // æ«ç ç¹æ£å·¥ä½ çæ«ç æ¡ç¹å» |
| | | 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.scanContent = res.result; |
| | | let flag = false |
| | | that.topContent.forEach(item => { |
| | | if (item.code === res.result) { |
| | | flag = true |
| | | } |
| | | }) |
| | | if (flag) { |
| | | that.$u.toast('æ¤æ¡ç å·²æ«æï¼å·²å¨å表ä¸ï¼') |
| | | } else { |
| | | //å¤çæ«ç äºä»¶ |
| | | that.getCheckScanDeviceQrCodeData(that.scanContent); |
| | | } |
| | | }, |
| | | complete: function(res) { |
| | | |
| | | }, |
| | | fail: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | |
| | | // ç¹æ£é¡¹ç®å
容 çæ«ç æ¡ç¹å» |
| | | centerScanClick(val) { |
| | | 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; |
| | | |
| | | |
| | | if (res.result === val) { |
| | | that.centerContent.find(item => item.code === val).isDisabled = false |
| | | that.centerContent.find(item => item.code === val).isOK = 'OK' |
| | | |
| | | if (that.centerContent.every(r => r.isOK === 'OK')) { |
| | | that.resultValue = 'OK' |
| | | } |
| | | if (that.centerContent.some(r => r.isOK === 'NG')) { |
| | | that.resultValue = 'NG' |
| | | } |
| | | if (that.centerContent.some(r => r.isOK === '')) { |
| | | that.resultValue = '' |
| | | } |
| | | |
| | | |
| | | that.$forceUpdate() |
| | | } else { |
| | | uni.$u.toast('ææ«æ¡ç ä¸ç¹æ£é¨ä½ä¸ç¬¦åï¼') |
| | | } |
| | | |
| | | |
| | | //å¤çæ«ç äºä»¶ |
| | | // that.SearchBarcode(); |
| | | }, |
| | | complete: function(res) {}, |
| | | fail: function(res) {} |
| | | |
| | | }); |
| | | }, |
| | | |
| | | // è·åç¹æ£å·¥ä½ |
| | | async getCheckScanDeviceQrCodeData(val) { |
| | | const data = { |
| | | eqpcode: val |
| | | } |
| | | const res = await CheckScanDeviceQrCodeData(data) |
| | | |
| | | if (res.code === '200' && res.data[0].eqpchkmain_code !== null) { //表示ç»å®äºæ å |
| | | this.topContent.unshift(res.data[0]) |
| | | // console.log(res.data[0],222); |
| | | this.getCheckScanDeviceTemp(res.data[0].code) |
| | | } else if (res.code === '200' && res.data[0].eqpchkmain_code === null) { |
| | | uni.$u.toast('å½åè®¾å¤æªè®¾ç½®ç¹æ£æ åç»å®ç¹æ£é¡¹ç®ï¼') |
| | | } |
| | | |
| | | }, |
| | | // è·åç¹æ£æ å |
| | | async getCheckScanDeviceTemp(eqpcode) { |
| | | const res = await CheckScanDeviceTemp({ |
| | | eqpcode |
| | | }) |
| | | this.selectRangeBZ = res.data.map(({ |
| | | code, |
| | | name |
| | | }) => ({ |
| | | text: name, |
| | | value: code |
| | | })) |
| | | |
| | | this.selectValueBZ = this.selectRangeBZ[0].value |
| | | |
| | | this.getSelectScanDeviceQrCodeItem(eqpcode, this.selectValueBZ) |
| | | |
| | | }, |
| | | //ç¹æ£æ å䏿鿩æ¹å |
| | | selectChangeBZ(val) { |
| | | this.selectValueBZ = val |
| | | |
| | | this.getSelectScanDeviceQrCodeItem(this.radioValue, this.selectValueBZ) |
| | | }, |
| | | // è·åç¹æ£é¡¹ç®å
容 |
| | | async getSelectScanDeviceQrCodeItem(eqpcode, checktempcode) { |
| | | |
| | | const data = { |
| | | eqpcode, |
| | | checktempcode |
| | | } |
| | | const res = await SelectScanDeviceQrCodeItem(data) |
| | | |
| | | if (res.code === '200') { |
| | | this.centerContent = res.data |
| | | |
| | | this.centerContent.forEach(item => { |
| | | item.inputValue = '' |
| | | item.isDisabled = item.isscan === 'Y' |
| | | item.isOK = item.isscan !== 'Y' ? 'OK' : '' |
| | | }) |
| | | |
| | | if (this.centerContent.every(r => r.isOK === 'OK')) { |
| | | this.resultValue = 'OK' |
| | | } |
| | | if (this.centerContent.some(r => r.isOK === 'NG')) { |
| | | this.resultValue = 'NG' |
| | | } |
| | | if (this.centerContent.some(r => r.isOK === '')) { |
| | | this.resultValue = '' |
| | | } |
| | | |
| | | this.radioValue = eqpcode |
| | | this.$forceUpdate() |
| | | } |
| | | |
| | | |
| | | }, |
| | | // åéæé®ç¹å» |
| | | groupChange(val) { |
| | | this.radioValue = val |
| | | this.$forceUpdate() |
| | | this.getCheckScanDeviceTemp(val) |
| | | }, |
| | | |
| | | // é¨ä½æ£å¸¸ å¼å¸¸æé®ç¹å» |
| | | bwClick(item, val) { |
| | | item.isOK = val |
| | | if (this.centerContent.every(item => item.isOK !== '')) { |
| | | if (this.centerContent.every(item => item.isOK === 'OK')) { |
| | | this.resultValue = 'OK' |
| | | } else { |
| | | this.resultValue = 'NG' |
| | | } |
| | | } |
| | | this.$forceUpdate() //强å¶è§å¾æ´æ° |
| | | }, |
| | | // ç¹æ£ç»æç¹å» |
| | | resultClick(val) { |
| | | this.resultValue = val |
| | | this.$forceUpdate() //强å¶è§å¾æ´æ° |
| | | }, |
| | | // 确认æäº¤æé® |
| | | async submit() { |
| | | const children = [] |
| | | this.centerContent.forEach(item => { |
| | | children.push({ |
| | | seq: item.seq, |
| | | itemcode: item.code, |
| | | cycle: item.cycle, |
| | | value: item.inputValue, |
| | | result: item.isOK |
| | | }) |
| | | |
| | | }) |
| | | const data = { |
| | | code: this.topContent.find(item => item.code === this.radioValue).code, |
| | | name: this.topContent.find(item => item.code === this.radioValue).name, |
| | | // standcode: this.topContent.find(item => item.code === this.radioValue).eqpchkmain_code, |
| | | standcode: this.selectValueBZ, |
| | | result: this.resultValue, |
| | | children: children |
| | | } |
| | | |
| | | // console.log(data, 8); |
| | | |
| | | |
| | | this.isDisabledSubmitButton = true |
| | | const res = await AppDeviceCheckSave(uni.getStorageSync("username"), data) |
| | | if (res.code === '200') { |
| | | |
| | | // this.$refs.uNotify.show({ |
| | | // top: 160, |
| | | // type: 'primary', |
| | | // color: '#fff', |
| | | // bgColor: '#436df5', |
| | | // message: 'æäº¤æå!', |
| | | // duration: 1000 * 3, |
| | | // fontSize: 30, |
| | | // safeAreaInsetTop: false |
| | | // }) |
| | | uni.$u.toast('æäº¤æåï¼') |
| | | this.isDisabledSubmitButton = false |
| | | this.topContent.forEach((item, index) => { |
| | | if (item.code === this.radioValue) { |
| | | // this.topContent.splice(index, 1) |
| | | // let prevPage = getCurrentPages()[getCurrentPages() |
| | | // .length - |
| | | // 2]; // ä¸ä¸é¡µé¢å®ä¾ |
| | | // prevPage.$vm |
| | | // .getEqpPermissions() // è°ç¨ä¸ä¸é¡µ å®ä¹çæ¹æ³ |
| | | |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1, //è¿å屿°ï¼2åä¸ä¸é¡µ |
| | | }) |
| | | }, 1000) |
| | | |
| | | |
| | | |
| | | } |
| | | }) |
| | | // this.radioValue = this.topContent[0].code |
| | | // if (this.radioValue.toString().length > 0) { |
| | | // this.getCheckScanDeviceTemp(val) |
| | | // } |
| | | |
| | | } else { |
| | | this.isDisabledSubmitButton = false |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | </style> |
| | |
| | | // uni.$u.toast('æäº¤æåï¼') |
| | | result.data.forEach(i => { |
| | | that.fileList.push({ |
| | | uri: 'http://121.196.36.24:8019/' + i, |
| | | uri: that.$baseUrl.split('api')[0] + i, |
| | | name: i |
| | | }) |
| | | |
| | | that.imgPreviewSrcs.push( |
| | | 'http://121.196.36.24:8019/' + i) |
| | | that.$baseUrl.split('api')[0] + i) |
| | | }) |
| | | } else { |
| | | uni.$u.toast(result.Message) |
| | |
| | | // uni.$u.toast('æäº¤æåï¼') |
| | | result.data.forEach(i => { |
| | | that.fileList2.push({ |
| | | uri: 'http://121.196.36.24:8019/' + |
| | | uri: that.$baseUrl.split('api')[ |
| | | 0] + |
| | | i, |
| | | name: i |
| | | }) |
| | | |
| | | that.imgPreviewSrcs2.push( |
| | | 'http://121.196.36.24:8019/' + i) |
| | | that.$baseUrl.split('api')[0] + i) |
| | | }) |
| | | } else { |
| | | uni.$u.toast(result.Message) |
| | |
| | | <page-nav title="设å¤ç»´ä¿®ç³è¯·"></page-nav> |
| | | |
| | | |
| | | <view v-show="topContent.length===0"> |
| | | <view v-if="purchorderArrAll.length>0"> |
| | | <!-- <view class="mainContent" :style="{maxHeight: '1340rpx',overflow: 'scroll',padding:0}"> --> |
| | | |
| | | <!-- #ifdef H5 --> |
| | | <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> |
| | | <!-- #endif --> |
| | | |
| | | <!-- #ifdef APP-PLUS --> |
| | | <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> |
| | | <!-- #endif --> |
| | | |
| | | |
| | | <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='18' :name='item.code' :key="item.code" |
| | | :label="item.code+'/'+item.name"></u-radio> |
| | | </view> |
| | | <u-line v-if="index!==purchorderArr.length-1" color="#2979ff"></u-line> |
| | | </view> |
| | | </u-radio-group> |
| | | |
| | | <view class="footer" style="min-height:62rpx;"> |
| | | <u-button type="primary" size='large' :hairline="true" @click="navigateTo" text="ä¸ä¸æ¥"></u-button> |
| | | </view> |
| | | <!-- </view> --> |
| | | </view> |
| | | |
| | | |
| | | <view v-if="purchorderArrAll.length===0"> |
| | | <div class="sacnBody"> |
| | | <div class="scanImg" @click="topScanClick"></div> |
| | | <div class="scanText">æ«æç»´ä¿®å·¥ä½</div> |
| | | <div class="boxImg"></div> |
| | | <div class="scanText">ææ è®¾å¤/å·¥ä½</div> |
| | | </div> |
| | | </view> |
| | | |
| | | |
| | | <view v-show="topContent.length!==0"> |
| | | <view class="mainContent"> |
| | | <view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head" style="max-height: 370rpx;overflow:scroll;"> |
| | | <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="28"></u-icon> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view class="marginTop20 marginLeft20 marginRight20 flex_column"> |
| | | <!-- <u-radio-group class=""> --> |
| | | <view class="marginBottom20 flex_between" @click="groupChange(item.code)" |
| | | v-for="item in topContent" :key="item.code"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>å·¥ä½ç¼ç ï¼</view> |
| | | <view>å·¥ä½åç§°ï¼</view> |
| | | <view>ç产车é´ï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{item.code}}</view> |
| | | <view>{{item.name}}</view> |
| | | <view>{{item.wksp_name}}</view> |
| | | </view> |
| | | </view> |
| | | <!-- <u-radio size='40' :key="item.code" :name="item.code" |
| | | @change="groupChange(item.code)" activeColor="red"></u-radio> --> |
| | | </view> |
| | | <!-- </u-radio-group> --> |
| | | </view> |
| | | |
| | | </view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | |
| | | <view class="head" style="padding-bottom: 10rpx;"> |
| | | <view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | æ
éæ¥æº |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginRight20" style="width: 200rpx;"> |
| | | <uni-data-select v-model="selectValue" :clear="false" :localdata="selectRange" |
| | | @change="selectChange"> |
| | | </uni-data-select> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | |
| | | <view class="head" style="padding-bottom: 10rpx;"> |
| | | <view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | æ
éæè¿° |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class='inputClass contentFont' style="margin: 0 20rpx; width: 95%;"> |
| | | <u--textarea placeholder="请è¾å
¥" confirm-type="send" border="surround" height='100' |
| | | v-model="descMessage"> |
| | | </u--textarea> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view style="display: flex;"> |
| | | <view v-for="(pic,index) in fileList" :key="pic.name"> |
| | | <view style="margin: 20rpx 0rpx 20rpx 20rpx;position: relative;"> |
| | | <u-icon name="close" color="#fff" size="13" |
| | | style="position: absolute;z-index: 10;right: 0;background-color: black;border-radius:50%;" |
| | | @click="deletePic(pic)"></u-icon> |
| | | |
| | | <image :src="pic.uri" @click="imgPreview(pic)" class="upLoadImg"></image> |
| | | </view> |
| | | </view> |
| | | <image v-if="fileList.length<3" src="../../static/img/uploadImg.png" style="width: 100rpx;height: 100rpx;border: 1rpx solid #eff0f1;border-radius: 20rpx; |
| | | margin: 20rpx;padding: 30rpx; |
| | | " @click="selectPics"> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <u-button size="large" :loading="isDisabledSubmitButton" loadingText="æ£å¨æäº¤,请ç¨ç..." type="primary" |
| | | @click="submit" :disabled="descMessage.toString().length===0" text="确认æäº¤"> |
| | | </u-button> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <scan-code></scan-code> |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { |
| | | MaintainScanDeviceApplyQrCodeData, |
| | | MaintainScanDeviceApplySave |
| | | } from '../../config/api.js' |
| | | import { |
| | | data |
| | | } from '../../uni_modules/uview-ui/libs/mixin/mixin.js'; |
| | | import scanCode from '@/components/scan-code/scan-code.vue' |
| | | |
| | | EqpPermissions |
| | | } from '../../config/api.js'; |
| | | export default { |
| | | components: { |
| | | scanCode |
| | | }, |
| | | onLoad(option) { |
| | | const _this = this |
| | | uni.$off('scancodedate') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scancodedate', function(content) { |
| | | console.log("æ«æå°çå
容为:", content) |
| | | _this.getMaintainScanDeviceApplyQrCodeData(content) |
| | | }) |
| | | }, |
| | | onLoad(option) {}, |
| | | |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | isDisabledSubmitButton: false, |
| | | |
| | | topContent: [], //æ«æä¿å
»å·¥ä½æå¸¦åºæ¥çå
容 |
| | | centerContent: [], //ä¿å
»é¡¹ç®å
容 |
| | | scanContent: '', //æ«ææ«åºæ¥çå¼ |
| | | // radioValue: '', //åéæ¡çå¼ |
| | | inputBoxValue: '', //è¾å
¥æ¡å¼ |
| | | |
| | | selectValue: 'A', |
| | | selectRange: [{ |
| | | value: 'A', |
| | | text: '设å¤ç¹æ£' |
| | | }, { |
| | | value: 'B', |
| | | text: '设å¤ä¿å
»' |
| | | }, { |
| | | value: 'C', |
| | | text: 'å®ç¯å¼å«' |
| | | }, { |
| | | value: 'D', |
| | | text: 'æå·¥' |
| | | }], |
| | | descMessage: '', //æ
éæè¿° |
| | | title: 0, |
| | | |
| | | imgPreviewSrcs: [], //å¾çé¢è§src |
| | | fileList: [], //å¾çæ°ç» |
| | | |
| | | radioValue: '', |
| | | |
| | | purchorderArr: [], |
| | | |
| | | purchorderArrAll: [] |
| | | } |
| | | }, |
| | | created() { |
| | | // const a = [{ |
| | | // name: 1 |
| | | // }] |
| | | // const b = [{ |
| | | // name: 1 |
| | | // }] |
| | | // console.log([...a, ...b]) |
| | | |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | // this.getMaintainScanDeviceApplyQrCodeData('101') |
| | | |
| | | this.getEqpPermissions() |
| | | }, |
| | | methods: { |
| | | // éæ©å¾ç |
| | | selectPics() { |
| | | var that = this; |
| | | uni.chooseImage({ |
| | | count: 3, |
| | | success: (res) => { |
| | | const files = res.tempFiles; |
| | | for (let i = 0; i < files.length; i++) { |
| | | let obj = new Object(); |
| | | obj.name = 'photo' + i + new Date().getTime(); |
| | | obj.uri = files[i].path; |
| | | that.fileList.push(obj); |
| | | if (obj.src == null || obj.src == '' || obj.src == undefined) { |
| | | that.imgPreviewSrcs.push(obj.uri) |
| | | } else { |
| | | that.imgPreviewSrcs.push(obj.src) |
| | | } |
| | | |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // é¢è§å¾ç |
| | | imgPreview(img) { |
| | | uni.previewImage({ |
| | | current: this.fileList.findIndex(i => i.name === img.name), |
| | | indicator: "number", |
| | | loop: true, |
| | | urls: this.imgPreviewSrcs |
| | | |
| | | }) |
| | | }, |
| | | // å é¤å¾ç |
| | | deletePic(img) { |
| | | console.log(img) |
| | | this.fileList = this.fileList.filter(i => i.name !== img.name) |
| | | this.imgPreviewSrcs = this.imgPreviewSrcs.filter(i => i !== img.uri) |
| | | }, |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | changeInputBoxValue(val) { |
| | | this.purchorderArr = this.purchorderArrAll.filter((p) => { |
| | | return p.code.indexOf(val) !== -1 |
| | | }) |
| | | |
| | | selectChange(val) { |
| | | console.log(val) |
| | | |
| | | if (this.purchorderArr.length > 0) { |
| | | this.radioValue = this.purchorderArr[0].code |
| | | } |
| | | |
| | | |
| | | }, |
| | | // æ«ç å·¥ä½ çæ«ç æ¡ç¹å» |
| | | topScanClick() { |
| | | // if (this.topContent.length > 0) { |
| | | // return uni.$u.toast('请å
æäº¤æ¤ç»´ä¿®ç³è¯·ï¼') |
| | | // } |
| | | inputBoxValueClear() { |
| | | this.inputBoxValue = '' |
| | | }, |
| | | radioValueClick(val) { |
| | | console.log(val) |
| | | this.radioValue = val |
| | | }, |
| | | navigateTo() { |
| | | uni.navigateTo({ |
| | | url: './wxsq2?code=' + this.radioValue |
| | | }); |
| | | }, |
| | | |
| | | // æ«ç æ¡ç¹å» |
| | | topScanClick() { |
| | | let that = this; |
| | | |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | // scanType: ['barCode', 'qrCode'], |
| | |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | that.scanContent = res.result; |
| | | let flag = false |
| | | that.topContent.forEach(item => { |
| | | if (item.code === res.result) { |
| | | flag = true |
| | | } |
| | | }) |
| | | if (flag) { |
| | | that.$u.toast('æ¤æ¡ç å·²æ«æï¼å·²å¨å表ä¸ï¼') |
| | | } else { |
| | | //å¤çæ«ç äºä»¶ |
| | | that.getMaintainScanDeviceApplyQrCodeData(that.scanContent); |
| | | } |
| | | that.changeInputBoxValue(that.scanContent); |
| | | }, |
| | | complete: function(res) { |
| | | |
| | |
| | | }); |
| | | }, |
| | | |
| | | // è·åç»´ä¿®å·¥ä½ |
| | | async getMaintainScanDeviceApplyQrCodeData(val) { |
| | | const data = { |
| | | eqpcode: val |
| | | } |
| | | async getEqpPermissions() { |
| | | const res = await EqpPermissions() |
| | | |
| | | const res = await MaintainScanDeviceApplyQrCodeData(data) |
| | | if (res.code === '200') { |
| | | this.topContent = [] |
| | | this.topContent.unshift(res.data[0]) |
| | | } |
| | | }, |
| | | this.purchorderArrAll = res.data |
| | | |
| | | // 确认æäº¤æé® |
| | | async submit() { |
| | | const header = { |
| | | // 'Content-Type': 'multipart/form-data', |
| | | // 'Content-Type': 'application/x-www-form-urlencoded', |
| | | 'Token': uni.getStorageSync('Token') |
| | | // 'rediskey': uni.getStorageSync('rediskey'), |
| | | // 'admin': uni.getStorageSync('usercode'), |
| | | // 'username': encodeURIComponent(uni.getStorageSync('username')), |
| | | // 'navTabId': uni.getStorageSync('usercode'), |
| | | // 'userid': uni.getStorageSync('userid'), |
| | | // 'guid': uni.getStorageSync('guid'), |
| | | // 'usertype': 'APP' |
| | | } |
| | | this.purchorderArr = res.data |
| | | |
| | | this.title = res.data.length |
| | | |
| | | this.radioValue = res.data[0].code |
| | | |
| | | |
| | | /* |
| | | å¨çµèä¸è¯·æ±æ¯éè¦H5ç代ç |
| | | ææºä¸è¯·æ±æ¯éè¦APP-PLUSç代ç |
| | | */ |
| | | // #ifdef H5 |
| | | // console.log('H5') |
| | | // let formData = new FormData() |
| | | // formData.append("username", uni.getStorageSync('username')) |
| | | // formData.append("eqpcode", this.topContent[0].code) |
| | | // formData.append("wkshpcode", this.topContent[0].wksp_code) |
| | | // formData.append("faultsourcecode", this.selectValue) |
| | | // formData.append("faultdescr", this.descMessage) |
| | | // this.fileList.forEach((item, index) => { |
| | | // formData.append('files1', item.file) |
| | | // }) |
| | | // MaintainScanDeviceApplySave(formData).then(res => { |
| | | // console.log(res, 1) |
| | | // }) |
| | | // #endif |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // #ifdef APP-PLUS ||MP |
| | | |
| | | let formData = { |
| | | eqpcode: this.topContent[0].code, |
| | | wkshpcode: this.topContent[0].wksp_code, |
| | | faultsourcecode: this.selectValue, |
| | | faultdescr: this.descMessage, |
| | | } |
| | | |
| | | |
| | | console.log(formData) |
| | | console.log(this.fileList, 'fileList') |
| | | |
| | | |
| | | this.isDisabledSubmitButton = true |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/DeviceManager/MaintainScanDeviceApplySave', |
| | | files: this.fileList.length === 0 ? [{ |
| | | uri: '/' |
| | | }] : this.fileList, |
| | | // files: [{"uri": "/" }], |
| | | header: header, |
| | | formData: formData, |
| | | success: (res) => { |
| | | // console.log(res, '1') |
| | | let result = JSON.parse(res.data) |
| | | if (res.statusCode == 200 && result.code == '200') { |
| | | uni.$u.toast('æäº¤æåï¼') |
| | | this.fileList = [] |
| | | this.imgPreviewSrcs = [] |
| | | this.descMessage = '' |
| | | this.topContent = [] |
| | | this.centerContent = [] |
| | | } else { |
| | | uni.$u.toast(result.Message) |
| | | } |
| | | this.isDisabledSubmitButton = false |
| | | }, |
| | | fail(res) { |
| | | // console.log(res, '1') |
| | | uni.$u.toast('æäº¤å¤±è´¥ï¼') |
| | | this.isDisabledSubmitButton = false |
| | | }, |
| | | }) |
| | | |
| | | // #endif |
| | | |
| | | |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | display: block; |
| | | } |
| | | |
| | | ::v-deep .uicon-camera-fill { |
| | | font-size: 60rpx !important; |
| | | .u-input--square { |
| | | margin: 20rpx 10rpx; |
| | | border-radius: 40rpx; |
| | | background-color: #fff; |
| | | border: 1px solid #c8c8c8; |
| | | } |
| | | |
| | | .uploader { |
| | | /deep/.u-add-tips { |
| | | display: none; |
| | | } |
| | | ::v-deep .u-alert__text--primary--light { |
| | | margin-bottom: 0; |
| | | font-size: 32rpx !important; |
| | | } |
| | | |
| | | ::v-deep .uni-progress-bar { |
| | | background-color: transparent !important; |
| | | .radioGroupClass { |
| | | display: flex; |
| | | flex-direction: column; |
| | | background-color: #fff; |
| | | |
| | | overflow-y: auto; |
| | | max-height: 1040rpx; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .upLoadImg { |
| | | width: 160rpx; |
| | | height: 160rpx; |
| | | border-radius: 20rpx; |
| | | ::v-deep .u-radio-label--right { |
| | | height: 90rpx; |
| | | line-height: 90rpx; |
| | | width: 92%; |
| | | margin-left: 4%; |
| | | // padding: 0 50rpx; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <page-nav title="设å¤ç»´ä¿®ç³è¯·"></page-nav> |
| | | |
| | | |
| | | <!-- <view v-show="topContent.length===0"> |
| | | <div class="sacnBody"> |
| | | <div class="scanImg" @click="topScanClick"></div> |
| | | <div class="scanText">æ«æç»´ä¿®å·¥ä½</div> |
| | | </div> |
| | | </view> --> |
| | | |
| | | |
| | | <view v-show="topContent.length!==0"> |
| | | <view class="mainContent"> |
| | | <view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | <view class="head" style="max-height: 370rpx;overflow:scroll;"> |
| | | <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="28"></u-icon> |
| | | </view> --> |
| | | |
| | | </view> |
| | | |
| | | <view class="marginTop20 marginLeft20 marginRight20 flex_column"> |
| | | <!-- <u-radio-group class=""> --> |
| | | <view class="marginBottom20 flex_between" @click="groupChange(item.code)" |
| | | v-for="item in topContent" :key="item.code"> |
| | | <view style="display: flex;"> |
| | | <view class="flex_column titleFont"> |
| | | <view>å·¥ä½ç¼ç ï¼</view> |
| | | <view>å·¥ä½åç§°ï¼</view> |
| | | <view>ç产车é´ï¼</view> |
| | | </view> |
| | | <view class="flex_column contentFont"> |
| | | <view>{{item.code}}</view> |
| | | <view>{{item.name}}</view> |
| | | <view>{{item.wksp_name}}</view> |
| | | </view> |
| | | </view> |
| | | <!-- <u-radio size='40' :key="item.code" :name="item.code" |
| | | @change="groupChange(item.code)" activeColor="red"></u-radio> --> |
| | | </view> |
| | | <!-- </u-radio-group> --> |
| | | </view> |
| | | |
| | | </view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | |
| | | <view class="head" style="padding-bottom: 10rpx;"> |
| | | <view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | æ
éæ¥æº |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="marginRight20" style="width: 200rpx;"> |
| | | <uni-data-select v-model="selectValue" :clear="false" :localdata="selectRange" |
| | | @change="selectChange"> |
| | | </uni-data-select> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <u-gap height="10" bgColor="#eff0f1"></u-gap> |
| | | |
| | | <view class="head" style="padding-bottom: 10rpx;"> |
| | | <view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;"> |
| | | <view class="head_left"> |
| | | <view class="head_bar"></view> |
| | | <view class="head_title"> |
| | | æ
éæè¿° |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class='inputClass contentFont' style="margin: 0 20rpx; width: 95%;"> |
| | | <u--textarea placeholder="请è¾å
¥" confirm-type="send" border="surround" height='100' |
| | | v-model="descMessage"> |
| | | </u--textarea> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view style="display: flex;"> |
| | | <view v-for="(pic,index) in fileList" :key="pic.name"> |
| | | <view style="margin: 20rpx 0rpx 20rpx 20rpx;position: relative;"> |
| | | <u-icon name="close" color="#fff" size="13" |
| | | style="position: absolute;z-index: 10;right: 0;background-color: black;border-radius:50%;" |
| | | @click="deletePic(pic)"></u-icon> |
| | | |
| | | <image :src="pic.uri" @click="imgPreview(pic)" class="upLoadImg"></image> |
| | | </view> |
| | | </view> |
| | | <image v-if="fileList.length<3" src="../../static/img/uploadImg.png" style="width: 100rpx;height: 100rpx;border: 1rpx solid #eff0f1;border-radius: 20rpx; |
| | | margin: 20rpx;padding: 30rpx; |
| | | " @click="selectPics"> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="footer"> |
| | | <u-button size="large" :loading="isDisabledSubmitButton" loadingText="æ£å¨æäº¤,请ç¨ç..." type="primary" |
| | | @click="submit" :disabled="descMessage.toString().length===0" text="确认æäº¤"> |
| | | </u-button> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <scan-code></scan-code> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | MaintainScanDeviceApplyQrCodeData, |
| | | MaintainScanDeviceApplySave |
| | | } from '../../config/api.js' |
| | | import { |
| | | data |
| | | } from '../../uni_modules/uview-ui/libs/mixin/mixin.js'; |
| | | import scanCode from '@/components/scan-code/scan-code.vue' |
| | | |
| | | export default { |
| | | components: { |
| | | scanCode |
| | | }, |
| | | onLoad(option) { |
| | | const _this = this |
| | | uni.$off('scancodedate') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scancodedate', function(content) { |
| | | console.log("æ«æå°çå
容为:", content) |
| | | _this.getMaintainScanDeviceApplyQrCodeData(content) |
| | | }) |
| | | _this.getMaintainScanDeviceApplyQrCodeData(option.code) |
| | | }, |
| | | onPullDownRefresh() { |
| | | setTimeout(() => { |
| | | this.init(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }) |
| | | }, 1000); |
| | | }, |
| | | data() { |
| | | return { |
| | | isDisabledSubmitButton: false, |
| | | |
| | | topContent: [], //æ«æä¿å
»å·¥ä½æå¸¦åºæ¥çå
容 |
| | | centerContent: [], //ä¿å
»é¡¹ç®å
容 |
| | | scanContent: '', //æ«ææ«åºæ¥çå¼ |
| | | // radioValue: '', //åéæ¡çå¼ |
| | | |
| | | selectValue: 'A', |
| | | selectRange: [{ |
| | | value: 'A', |
| | | text: '设å¤ç¹æ£' |
| | | }, { |
| | | value: 'B', |
| | | text: '设å¤ä¿å
»' |
| | | }, |
| | | // { |
| | | // value: 'C', |
| | | // text: 'å®ç¯å¼å«' |
| | | // }, |
| | | { |
| | | value: 'D', |
| | | text: 'æå·¥' |
| | | } |
| | | ], |
| | | descMessage: '', //æ
éæè¿° |
| | | |
| | | imgPreviewSrcs: [], //å¾çé¢è§src |
| | | fileList: [], //å¾çæ°ç» |
| | | } |
| | | }, |
| | | created() { |
| | | // const a = [{ |
| | | // name: 1 |
| | | // }] |
| | | // const b = [{ |
| | | // name: 1 |
| | | // }] |
| | | // console.log([...a, ...b]) |
| | | }, |
| | | mounted() { |
| | | this.init() |
| | | // this.getMaintainScanDeviceApplyQrCodeData('101') |
| | | |
| | | }, |
| | | methods: { |
| | | // éæ©å¾ç |
| | | selectPics() { |
| | | var that = this; |
| | | uni.chooseImage({ |
| | | count: 3, |
| | | success: (res) => { |
| | | const files = res.tempFiles; |
| | | for (let i = 0; i < files.length; i++) { |
| | | let obj = new Object(); |
| | | obj.name = 'photo' + i + new Date().getTime(); |
| | | obj.uri = files[i].path; |
| | | that.fileList.push(obj); |
| | | if (obj.src == null || obj.src == '' || obj.src == undefined) { |
| | | that.imgPreviewSrcs.push(obj.uri) |
| | | } else { |
| | | that.imgPreviewSrcs.push(obj.src) |
| | | } |
| | | |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // é¢è§å¾ç |
| | | imgPreview(img) { |
| | | uni.previewImage({ |
| | | current: this.fileList.findIndex(i => i.name === img.name), |
| | | indicator: "number", |
| | | loop: true, |
| | | urls: this.imgPreviewSrcs |
| | | |
| | | }) |
| | | }, |
| | | // å é¤å¾ç |
| | | deletePic(img) { |
| | | console.log(img) |
| | | this.fileList = this.fileList.filter(i => i.name !== img.name) |
| | | this.imgPreviewSrcs = this.imgPreviewSrcs.filter(i => i !== img.uri) |
| | | }, |
| | | init() { |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | |
| | | selectChange(val) { |
| | | console.log(val) |
| | | }, |
| | | // æ«ç å·¥ä½ çæ«ç æ¡ç¹å» |
| | | 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; |
| | | let flag = false |
| | | that.topContent.forEach(item => { |
| | | if (item.code === res.result) { |
| | | flag = true |
| | | } |
| | | }) |
| | | if (flag) { |
| | | that.$u.toast('æ¤æ¡ç å·²æ«æï¼å·²å¨å表ä¸ï¼') |
| | | } else { |
| | | //å¤çæ«ç äºä»¶ |
| | | that.getMaintainScanDeviceApplyQrCodeData(that.scanContent); |
| | | } |
| | | }, |
| | | complete: function(res) { |
| | | |
| | | }, |
| | | fail: function(res) { |
| | | console.log('æ¡ç ç±»åï¼' + res.scanType); |
| | | console.log('æ¡ç å
容ï¼' + res.result); |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | |
| | | // è·åç»´ä¿®å·¥ä½ |
| | | async getMaintainScanDeviceApplyQrCodeData(val) { |
| | | const data = { |
| | | eqpcode: val |
| | | } |
| | | |
| | | const res = await MaintainScanDeviceApplyQrCodeData(data) |
| | | if (res.code === '200') { |
| | | this.topContent = [] |
| | | this.topContent.unshift(res.data[0]) |
| | | } else { |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1, //è¿å屿°ï¼2åä¸ä¸é¡µ |
| | | }) |
| | | }, 1000) |
| | | } |
| | | }, |
| | | |
| | | // 确认æäº¤æé® |
| | | async submit() { |
| | | const header = { |
| | | // 'Content-Type': 'multipart/form-data', |
| | | // 'Content-Type': 'application/x-www-form-urlencoded', |
| | | 'Token': uni.getStorageSync('Token') |
| | | // 'rediskey': uni.getStorageSync('rediskey'), |
| | | // 'admin': uni.getStorageSync('usercode'), |
| | | // 'username': encodeURIComponent(uni.getStorageSync('username')), |
| | | // 'navTabId': uni.getStorageSync('usercode'), |
| | | // 'userid': uni.getStorageSync('userid'), |
| | | // 'guid': uni.getStorageSync('guid'), |
| | | // 'usertype': 'APP' |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /* |
| | | å¨çµèä¸è¯·æ±æ¯éè¦H5ç代ç |
| | | ææºä¸è¯·æ±æ¯éè¦APP-PLUSç代ç |
| | | */ |
| | | // #ifdef H5 |
| | | // console.log('H5') |
| | | // let formData = new FormData() |
| | | // formData.append("username", uni.getStorageSync('username')) |
| | | // formData.append("eqpcode", this.topContent[0].code) |
| | | // formData.append("wkshpcode", this.topContent[0].wksp_code) |
| | | // formData.append("faultsourcecode", this.selectValue) |
| | | // formData.append("faultdescr", this.descMessage) |
| | | // this.fileList.forEach((item, index) => { |
| | | // formData.append('files1', item.file) |
| | | // }) |
| | | // MaintainScanDeviceApplySave(formData).then(res => { |
| | | // console.log(res, 1) |
| | | // }) |
| | | // #endif |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // #ifdef APP-PLUS ||MP |
| | | |
| | | let formData = { |
| | | eqpcode: this.topContent[0].code, |
| | | wkshpcode: this.topContent[0].wksp_code, |
| | | faultsourcecode: this.selectValue, |
| | | faultdescr: this.descMessage, |
| | | } |
| | | |
| | | |
| | | console.log(formData) |
| | | console.log(this.fileList, 'fileList') |
| | | |
| | | |
| | | this.isDisabledSubmitButton = true |
| | | uni.uploadFile({ |
| | | url: this.$baseUrl + '/DeviceManager/MaintainScanDeviceApplySave', |
| | | files: this.fileList.length === 0 ? [{ |
| | | uri: '/' |
| | | }] : this.fileList, |
| | | // files: [{"uri": "/" }], |
| | | header: header, |
| | | formData: formData, |
| | | success: (res) => { |
| | | // console.log(res, '1') |
| | | let result = JSON.parse(res.data) |
| | | if (res.statusCode == 200 && result.code == '200') { |
| | | uni.$u.toast('æäº¤æåï¼') |
| | | this.fileList = [] |
| | | this.imgPreviewSrcs = [] |
| | | this.descMessage = '' |
| | | this.topContent = [] |
| | | this.centerContent = [] |
| | | |
| | | // let prevPage = getCurrentPages()[getCurrentPages() |
| | | // .length - |
| | | // 2]; // ä¸ä¸é¡µé¢å®ä¾ |
| | | // prevPage.$vm |
| | | // .changeInputBoxValue('') // è°ç¨ä¸ä¸é¡µ å®ä¹çæ¹æ³ |
| | | |
| | | |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1, //è¿å屿°ï¼2åä¸ä¸é¡µ |
| | | }) |
| | | }, 1000) |
| | | |
| | | } else { |
| | | uni.$u.toast(result.Message) |
| | | } |
| | | this.isDisabledSubmitButton = false |
| | | |
| | | |
| | | }, |
| | | fail(res) { |
| | | // console.log(res, '1') |
| | | uni.$u.toast('æäº¤å¤±è´¥ï¼') |
| | | this.isDisabledSubmitButton = false |
| | | }, |
| | | }) |
| | | |
| | | // #endif |
| | | |
| | | |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import url('@/style/global.css'); |
| | | |
| | | ::v-deep .uicon-arrow-left>span { |
| | | display: block; |
| | | } |
| | | |
| | | ::v-deep .uicon-camera-fill { |
| | | font-size: 60rpx !important; |
| | | } |
| | | |
| | | .uploader { |
| | | /deep/.u-add-tips { |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .uni-progress-bar { |
| | | background-color: transparent !important; |
| | | } |
| | | |
| | | .upLoadImg { |
| | | width: 160rpx; |
| | | height: 160rpx; |
| | | border-radius: 20rpx; |
| | | } |
| | | </style> |
| | |
| | | data() { |
| | | return { |
| | | isDisabledSubmitButton: false, |
| | | baseUrl: 'http://121.196.36.24:8019/', |
| | | baseUrl: this.$baseUrl.split('api')[0], |
| | | topContent: [], //æ«æä¿å
»å·¥ä½æå¸¦åºæ¥çå
容 |
| | | radioValue: '', //åéæ¡çå¼ |
| | | scanContent: '', //æ«ææ«åºæ¥çå¼ |
| | |
| | | </u-grid> |
| | | |
| | | |
| | | <u-grid style='margin: 12rpx;' :border="false" v-if="$companyType==='A'"> |
| | | <u-grid style='margin: 12rpx;' :border="false" v-if="$companyType==='A'||$companyType==='C'"> |
| | | <u-grid-item @click="index=>clickGridPopup(index,item.name,item.code)" v-for="(item,index) in menuList" |
| | | :key="item.code"> |
| | | <img :src="item.imgurl" alt="" style='width: 116rpx;height: 116rpx;border-radius: 20rpx;'> |
| | |
| | | |
| | | |
| | | <u-grid style='margin: 12rpx;' :border="false" v-if="$companyType==='B'"> |
| | | <u-grid-item @click="index=>clickGrid(index,item.name,item.code)" v-for="(item,index) in menuList" |
| | | <u-grid-item @click=" index=>clickGrid(index,item.name,item.code)" v-for="(item,index) in menuList" |
| | | :key="item.code"> |
| | | <img :src="item.imgurl" alt="" style='width: 116rpx;height: 116rpx;border-radius: 20rpx;'> |
| | | <text class="grid-text">{{item.name}}</text> |
| | |
| | | // this.menuList.push(j) |
| | | // }) |
| | | // }) |
| | | } else if (this.$companyType === 'C') { |
| | | this.menuList = res.data.filter(i => i.code === '2004')[0].children |
| | | } |
| | | |
| | | console.log(this.menuList, 123) |