| | |
| | | NuclearScaleEntry: { |
| | | // è·å客æ·åç§° |
| | | selClient: (params = {}) => vm.$u.get('/mes/weighingVerification/selClient'), |
| | | // åå»ºæ ¸ç£
åæäº¤ |
| | | createMain: (params = {}) => vm.$u.post('/mes/weighingVerification/createMain', params), |
| | | // æ ¸ç£
åå· |
| | | getWeighingOrder: (params = {}) => vm.$u.get('/mes/weighingVerification/pageVerificationMain', params), |
| | | } |
| | | }; |
| | | |
| | |
| | | <view class="item-one item-two" @click="openPN()"> |
| | | <text>{{ registerInfo.value6 == '' ? "ç¹å»è¾å
¥" : registerInfo.value6 }}</text> |
| | | </view> |
| | | <u-icon name="arrow-right" color="#687792" size="28" v-show="registerInfo.value6 == ''"></u-icon> |
| | | <u-icon name="arrow-right" color="#687792" size="28" |
| | | v-show="registerInfo.value6 == ''"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | |
| | | <text class="item-one">æ¹æ¬¡å·</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right" @click="openBatch()"> |
| | | <text class="item-one item-two">{{ registerInfo.value3 == '' ? "ç¹å»è¾å
¥" : registerInfo.value3 }}</text> |
| | | <u-icon name="arrow-right" color="#687792" size="28" v-show="registerInfo.value3 == ''"></u-icon> |
| | | <text |
| | | class="item-one item-two">{{ registerInfo.value3 == '' ? "ç¹å»è¾å
¥" : registerInfo.value3 }}</text> |
| | | <u-icon name="arrow-right" color="#687792" size="28" |
| | | v-show="registerInfo.value3 == ''"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | |
| | | <view class="item-one item-two"> |
| | | <text>{{ registerInfo.value4 == '' ? "ç¹å»è¾å
¥" : registerInfo.value4 }}</text> |
| | | </view> |
| | | <u-icon name="arrow-right" color="#687792" size="28" v-show="registerInfo.value4 == ''"></u-icon> |
| | | <u-icon name="arrow-right" color="#687792" size="28" |
| | | v-show="registerInfo.value4 == ''"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | |
| | | <view class="item-one item-two"> |
| | | <text>{{ registerInfo.value5 == '' ? "ç¹å»è¾å
¥" : registerInfo.value5 }}</text> |
| | | </view> |
| | | <u-icon name="arrow-right" color="#687792" size="28" v-show="registerInfo.value4 == ''"></u-icon> |
| | | <u-icon name="arrow-right" color="#687792" size="28" |
| | | v-show="registerInfo.value4 == ''"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | |
| | | </modalBg> |
| | | <!-- çç¹æ°é --> |
| | | <modalBg ref="openPhysicalInventory" :confirm="confirmPhysicalInventory"> |
| | | <u-field v-model="registerInfo.value5" label="çç¹æ°éï¼" label-width="140" placeholder="请è¾å
¥" :border-bottom="false"> |
| | | <u-field v-model="registerInfo.value5" label="çç¹æ°éï¼" label-width="140" placeholder="请è¾å
¥" |
| | | :border-bottom="false"> |
| | | </u-field> |
| | | </modalBg> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import modalBg from '@/components/modal/modal-bg.vue' |
| | | import scan from "@/components/scan/scan.vue"; |
| | | import content_bg from '@/static/custom/packing/backBg.png' |
| | | export default { |
| | | components: { |
| | | scan, |
| | | modalBg |
| | | }, |
| | | data() { |
| | | return { |
| | | background: { |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | labelStyle: { |
| | | fontSize: '32rpx', |
| | | whiteSpace: 'nowrap' |
| | | }, |
| | | registerInfo: { |
| | | value1: '', |
| | | value2: '', |
| | | value3: '', |
| | | value4: '', |
| | | value5: '', |
| | | value6: '' |
| | | }, |
| | | hasScanSnList: [{ |
| | | value0: '11111111111111111111111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | }, |
| | | { |
| | | value0: '111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | }, |
| | | { |
| | | value0: '111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | }, |
| | | { |
| | | value0: '111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | }, |
| | | ], |
| | | delContent: null, |
| | | staffList: [], |
| | | }; |
| | | }, |
| | | onLoad(option) { }, |
| | | onShow() { |
| | | import modalBg from '@/components/modal/modal-bg.vue' |
| | | import scan from "@/components/scan/scan.vue"; |
| | | import content_bg from '@/static/custom/packing/backBg.png' |
| | | export default { |
| | | components: { |
| | | scan, |
| | | modalBg |
| | | }, |
| | | data() { |
| | | return { |
| | | background: { |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | labelStyle: { |
| | | fontSize: '32rpx', |
| | | whiteSpace: 'nowrap' |
| | | }, |
| | | registerInfo: { |
| | | value1: '', |
| | | value2: '', |
| | | value3: '', |
| | | value4: '', |
| | | value5: '', |
| | | value6: '' |
| | | }, |
| | | hasScanSnList: [{ |
| | | value0: '11111111111111111111111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | }, |
| | | { |
| | | value0: '111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | }, |
| | | { |
| | | value0: '111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | }, |
| | | { |
| | | value0: '111', |
| | | value1: '111', |
| | | value2: '111', |
| | | value3: '111', |
| | | }, |
| | | ], |
| | | delContent: null, |
| | | staffList: [], |
| | | }; |
| | | }, |
| | | onLoad(option) {}, |
| | | onShow() { |
| | | |
| | | let that = this |
| | | let that = this |
| | | |
| | | uni.$off('scan') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scan', function (data) { |
| | | console.log('onscan'); |
| | | //æ«ç æååçåè°ï¼ä½ å¯ä»¥åèªå·±çé»è¾ä»£ç å¨è¿é |
| | | console.log('æ«ç ç»æï¼', data.code); |
| | | that.scanHandle(data.code) |
| | | that.$forceUpdate(); |
| | | uni.$off('scan') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scan', function(data) { |
| | | console.log('onscan'); |
| | | //æ«ç æååçåè°ï¼ä½ å¯ä»¥åèªå·±çé»è¾ä»£ç å¨è¿é |
| | | console.log('æ«ç ç»æï¼', data.code); |
| | | that.scanHandle(data.code) |
| | | that.$forceUpdate(); |
| | | |
| | | }) |
| | | }, |
| | | onNavigationBarButtonTap() { |
| | | this.goScan() |
| | | }, |
| | | onReady() { }, |
| | | methods: { |
| | | //é¶ä»¶å· |
| | | openPN() { |
| | | this.$refs.openPN.open(); |
| | | }, |
| | | // å¼¹æ¡ä¿å |
| | | confirmPN() { |
| | | console.log('ä¿å', this.registerInfo.value6); |
| | | // è¯·æ±æ¥å£ï¼æ ¹æ®å·¥åå·æ¥è¯¢å
¶ä»ä¿¡æ¯å¹¶èµå¼ |
| | | }, |
| | | //æ¹æ¬¡å· |
| | | openBatch() { |
| | | this.$refs.openBatch.open(); |
| | | }, |
| | | // å¼¹æ¡ä¿å |
| | | confirmBatch() { |
| | | console.log('ä¿å', this.registerInfo.value3); |
| | | // è¯·æ±æ¥å£ï¼æ ¹æ®å·¥åå·æ¥è¯¢å
¶ä»ä¿¡æ¯å¹¶èµå¼ |
| | | }, |
| | | //åºä½å· |
| | | openLocation() { |
| | | this.$refs.openLocation.open(); |
| | | }, |
| | | // å¼¹æ¡ä¿å |
| | | confirmLocation() { |
| | | console.log('ä¿å', this.registerInfo.value4); |
| | | // è¯·æ±æ¥å£ï¼æ ¹æ®å·¥åå·æ¥è¯¢å
¶ä»ä¿¡æ¯å¹¶èµå¼ |
| | | }, |
| | | //çç¹æ°é |
| | | openPhysicalInventory() { |
| | | this.$refs.openPhysicalInventory.open(); |
| | | }, |
| | | // å¼¹æ¡ä¿å |
| | | confirmPhysicalInventory() { |
| | | console.log('ä¿å', this.registerInfo.value5); |
| | | // è¯·æ±æ¥å£ï¼æ ¹æ®å·¥åå·æ¥è¯¢å
¶ä»ä¿¡æ¯å¹¶èµå¼ |
| | | }, |
| | | |
| | | setNo(val) { |
| | | console.log('11111', val) |
| | | this.registerInfo.value1 = val.value1 |
| | | this.registerInfo.value2 = val.value2 |
| | | |
| | | }, |
| | | //çç¹æ¥åå· |
| | | seachPersonnelNo() { |
| | | console.log('11111') |
| | | uni.navigateTo({ |
| | | url: '/pages/wareHouse/inventory/orderList' |
| | | }) |
| | | }, |
| | | goScan() { |
| | | uni.scanCode({ |
| | | scanType: ['qrCode'], |
| | | success: res => { |
| | | try { |
| | | console.log('æ«ç ç»æï¼', res); |
| | | this.scanHandle(res.result) |
| | | } catch (e) { } |
| | | } |
| | | }); |
| | | onNavigationBarButtonTap() { |
| | | this.goScan() |
| | | }, |
| | | scanHandle(scanresult) { |
| | | scanresult = scanresult.replace(/[\r\n]/g, "") |
| | | if (scanresult.indexOf('{') > -1) { |
| | | //äºç»´ç |
| | | const result = JSON.parse(scanresult) |
| | | //å¢å SNæ ¡éª |
| | | if (result.sn_no && result.sn_no != null && result.sn_no != '') { |
| | | if (this.hasScanSnList.length > 0) { |
| | | let hasScanSnIndex = this.hasScanSnList.indexOf(result.sn_no) |
| | | if (hasScanSnIndex < 0) { |
| | | onReady() {}, |
| | | methods: { |
| | | //é¶ä»¶å· |
| | | openPN() { |
| | | this.$refs.openPN.open(); |
| | | }, |
| | | // å¼¹æ¡ä¿å |
| | | confirmPN() { |
| | | console.log('ä¿å', this.registerInfo.value6); |
| | | // è¯·æ±æ¥å£ï¼æ ¹æ®å·¥åå·æ¥è¯¢å
¶ä»ä¿¡æ¯å¹¶èµå¼ |
| | | }, |
| | | //æ¹æ¬¡å· |
| | | openBatch() { |
| | | this.$refs.openBatch.open(); |
| | | }, |
| | | // å¼¹æ¡ä¿å |
| | | confirmBatch() { |
| | | console.log('ä¿å', this.registerInfo.value3); |
| | | // è¯·æ±æ¥å£ï¼æ ¹æ®å·¥åå·æ¥è¯¢å
¶ä»ä¿¡æ¯å¹¶èµå¼ |
| | | }, |
| | | //åºä½å· |
| | | openLocation() { |
| | | this.$refs.openLocation.open(); |
| | | }, |
| | | // å¼¹æ¡ä¿å |
| | | confirmLocation() { |
| | | console.log('ä¿å', this.registerInfo.value4); |
| | | // è¯·æ±æ¥å£ï¼æ ¹æ®å·¥åå·æ¥è¯¢å
¶ä»ä¿¡æ¯å¹¶èµå¼ |
| | | }, |
| | | //çç¹æ°é |
| | | openPhysicalInventory() { |
| | | this.$refs.openPhysicalInventory.open(); |
| | | }, |
| | | // å¼¹æ¡ä¿å |
| | | confirmPhysicalInventory() { |
| | | console.log('ä¿å', this.registerInfo.value5); |
| | | // è¯·æ±æ¥å£ï¼æ ¹æ®å·¥åå·æ¥è¯¢å
¶ä»ä¿¡æ¯å¹¶èµå¼ |
| | | }, |
| | | |
| | | setNo(val) { |
| | | console.log('11111', val) |
| | | this.registerInfo.value1 = val.value1 |
| | | this.registerInfo.value2 = val.value2 |
| | | |
| | | }, |
| | | //çç¹æ¥åå· |
| | | seachPersonnelNo() { |
| | | console.log('11111') |
| | | uni.navigateTo({ |
| | | url: '/pages/wareHouse/inventory/orderList' |
| | | }) |
| | | }, |
| | | goScan() { |
| | | uni.scanCode({ |
| | | scanType: ['qrCode'], |
| | | success: res => { |
| | | try { |
| | | console.log('æ«ç ç»æï¼', res); |
| | | this.scanHandle(res.result) |
| | | } catch (e) {} |
| | | } |
| | | }); |
| | | }, |
| | | scanHandle(scanresult) { |
| | | scanresult = scanresult.replace(/[\r\n]/g, "") |
| | | if (scanresult.indexOf('{') > -1) { |
| | | //äºç»´ç |
| | | const result = JSON.parse(scanresult) |
| | | //å¢å SNæ ¡éª |
| | | if (result.sn_no && result.sn_no != null && result.sn_no != '') { |
| | | if (this.hasScanSnList.length > 0) { |
| | | let hasScanSnIndex = this.hasScanSnList.indexOf(result.sn_no) |
| | | if (hasScanSnIndex < 0) { |
| | | this.hasScanSnList.push(result.sn_no) |
| | | } else { |
| | | this.$u.toast('请å¿é夿«æ') |
| | | } |
| | | } else { |
| | | this.hasScanSnList.push(result.sn_no) |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | //å¢å SNæ ¡éª |
| | | if (this.hasScanSnList.length > 0) { |
| | | let hasScanSnIndex = this.hasScanSnList.indexOf(scanresult) |
| | | if (hasScanSnIndex < 0) { |
| | | this.hasScanSnList.push(scanresult) |
| | | } else { |
| | | this.$u.toast('请å¿é夿«æ') |
| | | } |
| | | } else { |
| | | this.hasScanSnList.push(result.sn_no) |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | //å¢å SNæ ¡éª |
| | | if (this.hasScanSnList.length > 0) { |
| | | let hasScanSnIndex = this.hasScanSnList.indexOf(scanresult) |
| | | if (hasScanSnIndex < 0) { |
| | | this.hasScanSnList.push(scanresult) |
| | | } else { |
| | | this.$u.toast('请å¿é夿«æ') |
| | | } |
| | | } else { |
| | | this.hasScanSnList.push(scanresult) |
| | | } |
| | | } |
| | | }, |
| | | goSubmit() { |
| | | // if (this.registerInfo.shiftId == null || this.registerInfo.shiftId == '') { |
| | | // this.$u.toast('è¯·éæ©çæ¬¡') |
| | | // return |
| | | // } |
| | | // if (this.registerInfo.value3 == null || this.registerInfo.value3 == '') { |
| | | // this.$u.toast('è¯·éæ©æ¥æ') |
| | | // return |
| | | // } |
| | | // if (this.registerInfo.locNo == null || this.registerInfo.locNo == '') { |
| | | // this.$u.toast('è¯·éæ©å
è£
åºä½') |
| | | // return |
| | | // } |
| | | // if (this.hasScanSnList.length == 0) { |
| | | // this.$u.toast('æ å¾
æäº¤çSNå·æç»') |
| | | // return |
| | | // } |
| | | // let registrList = [] |
| | | // this.staffList = [] |
| | | // this.staffNameList.forEach((item) => { |
| | | // this.staffList.push({ |
| | | // staffId: item.id |
| | | // }) |
| | | // }) |
| | | // this.hasScanSnList.forEach((item) => { |
| | | // registrList.push({ |
| | | // shiftId: this.registerInfo.shiftId, |
| | | // value3: this.registerInfo.value3, |
| | | // locNo: this.registerInfo.locNo, |
| | | // partBatchNo: item, |
| | | // staffList: this.staffList |
| | | // }) |
| | | // }) |
| | | // this.$u.api.pigxPacking.addPackageRegister(registrList).then(res => { |
| | | // let resData = res.data |
| | | // this.hasScanSnList = [] |
| | | // this.$u.toast('æäº¤æå') |
| | | // }).catch((e) => { |
| | | // }) |
| | | }, |
| | | goSubmit() { |
| | | // if (this.registerInfo.shiftId == null || this.registerInfo.shiftId == '') { |
| | | // this.$u.toast('è¯·éæ©çæ¬¡') |
| | | // return |
| | | // } |
| | | // if (this.registerInfo.value3 == null || this.registerInfo.value3 == '') { |
| | | // this.$u.toast('è¯·éæ©æ¥æ') |
| | | // return |
| | | // } |
| | | // if (this.registerInfo.locNo == null || this.registerInfo.locNo == '') { |
| | | // this.$u.toast('è¯·éæ©å
è£
åºä½') |
| | | // return |
| | | // } |
| | | // if (this.hasScanSnList.length == 0) { |
| | | // this.$u.toast('æ å¾
æäº¤çSNå·æç»') |
| | | // return |
| | | // } |
| | | // let registrList = [] |
| | | // this.staffList = [] |
| | | // this.staffNameList.forEach((item) => { |
| | | // this.staffList.push({ |
| | | // staffId: item.id |
| | | // }) |
| | | // }) |
| | | // this.hasScanSnList.forEach((item) => { |
| | | // registrList.push({ |
| | | // shiftId: this.registerInfo.shiftId, |
| | | // value3: this.registerInfo.value3, |
| | | // locNo: this.registerInfo.locNo, |
| | | // partBatchNo: item, |
| | | // staffList: this.staffList |
| | | // }) |
| | | // }) |
| | | // this.$u.api.pigxPacking.addPackageRegister(registrList).then(res => { |
| | | // let resData = res.data |
| | | // this.hasScanSnList = [] |
| | | // this.$u.toast('æäº¤æå') |
| | | // }).catch((e) => { |
| | | // }) |
| | | |
| | | }, |
| | | } |
| | | }; |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .packing-registration-bg { |
| | | background-color: #F6F9FF; |
| | | background-image: url('~@/static/custom/packing/backBg.png'); |
| | | padding: 0 20rpx; |
| | | background-attachment: fixed; |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .packing-registration-param { |
| | | padding: 40rpx 30rpx 10rpx 30rpx; |
| | | |
| | | .packing-registration-param-title { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .title-label { |
| | | margin-left: 14rpx; |
| | | font-size: 34rpx; |
| | | font-weight: bold; |
| | | color: #283E65; |
| | | } |
| | | .packing-registration-bg { |
| | | background-color: #F6F9FF; |
| | | background-image: url('~@/static/custom/packing/backBg.png'); |
| | | padding: 0 20rpx; |
| | | background-attachment: fixed; |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .packing-registration-param-view { |
| | | height: 615rpx; |
| | | background-color: #fff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | margin-bottom: 30rpx; |
| | | .packing-registration-param { |
| | | padding: 40rpx 30rpx 10rpx 30rpx; |
| | | |
| | | .packing-registration-param-item { |
| | | height: 90rpx; |
| | | border: 1px solid #ADC8E4; |
| | | line-height: 90rpx; |
| | | .packing-registration-param-title { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: none; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .packing-registration-param-item-left { |
| | | .item-one { |
| | | font-size: 30rpx; |
| | | color: #666666; |
| | | } |
| | | .title-label { |
| | | margin-left: 14rpx; |
| | | font-size: 34rpx; |
| | | font-weight: bold; |
| | | color: #283E65; |
| | | } |
| | | } |
| | | |
| | | .packing-registration-param-item-right { |
| | | .packing-registration-param-view { |
| | | height: 615rpx; |
| | | background-color: #fff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .packing-registration-param-item { |
| | | height: 90rpx; |
| | | border: 1px solid #ADC8E4; |
| | | line-height: 90rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: none; |
| | | |
| | | .item-one { |
| | | font-size: 30rpx; |
| | | color: #333333; |
| | | margin-right: 6rpx; |
| | | .packing-registration-param-item-left { |
| | | .item-one { |
| | | font-size: 30rpx; |
| | | color: #666666; |
| | | } |
| | | } |
| | | |
| | | .item-two { |
| | | font-size: 30rpx; |
| | | color: #A6B4CC; |
| | | margin-right: 6rpx; |
| | | } |
| | | .packing-registration-param-item-right { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .item-three { |
| | | font-size: 30rpx; |
| | | color: #214DED; |
| | | margin-right: 6rpx; |
| | | .item-one { |
| | | font-size: 30rpx; |
| | | color: #333333; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | .item-two { |
| | | font-size: 30rpx; |
| | | color: #A6B4CC; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | .item-three { |
| | | font-size: 30rpx; |
| | | color: #214DED; |
| | | margin-right: 6rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .param-extra { |
| | | border-bottom: 1px solid #EDEDED; |
| | | .param-extra { |
| | | border-bottom: 1px solid #EDEDED; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .wrap .packing-registration-scroll-list { |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 930rpx); |
| | | width: 100%; |
| | | } |
| | | |
| | | .packing-registration-scroll-list-group { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: rgba(250, 252, 255, 0.36) !important; |
| | | padding: 0rpx 30rpx; |
| | | .wrap .packing-registration-scroll-list { |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 930rpx); |
| | | width: 100%; |
| | | } |
| | | |
| | | .content { |
| | | font-size: 12px; |
| | | background-color: #ffffff; |
| | | box-sizing: border-box; |
| | | border-radius: 10rpx; |
| | | margin: 0rpx 0rpx 16rpx; |
| | | padding: 20rpx 8rpx; |
| | | box-shadow: none; |
| | | display: flex; |
| | | align-items: center; |
| | | .packing-registration-scroll-list-group { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: rgba(250, 252, 255, 0.36) !important; |
| | | padding: 0rpx 30rpx; |
| | | } |
| | | |
| | | .content-header { |
| | | width: 40rpx; |
| | | height: 90rpx; |
| | | .content { |
| | | font-size: 12px; |
| | | background-color: #ffffff; |
| | | box-sizing: border-box; |
| | | border-radius: 10rpx; |
| | | margin: 0rpx 0rpx 16rpx; |
| | | padding: 20rpx 8rpx; |
| | | box-shadow: none; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .content-header-icon { |
| | | background-image: url("~@/static/custom/moveWareHouse/header_icon.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 28rpx; |
| | | width: 28rpx; |
| | | } |
| | | |
| | | .content-header-title { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: bold; |
| | | color: #626369; |
| | | } |
| | | } |
| | | |
| | | .content-body { |
| | | flex: 1; |
| | | background-color: #ffffff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | |
| | | .row-list { |
| | | height: 60rpx; |
| | | .content-header { |
| | | width: 40rpx; |
| | | height: 90rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | padding: 0px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .row-list ._label { |
| | | display: flex; |
| | | flex: 0.8; |
| | | color: #909399; |
| | | align-items: center; |
| | | |
| | | ._label-name { |
| | | .content-header-icon { |
| | | background-image: url("~@/static/custom/moveWareHouse/header_icon.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 28rpx; |
| | | width: 28rpx; |
| | | } |
| | | |
| | | .content-header-title { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 500; |
| | | color: #666666; |
| | | font-weight: bold; |
| | | color: #626369; |
| | | } |
| | | } |
| | | |
| | | .row-list ._content { |
| | | flex: 1.5; |
| | | text-align: right; |
| | | color: #909399; |
| | | font-size: 24rpx; |
| | | } |
| | | .content-body { |
| | | flex: 1; |
| | | background-color: #ffffff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | |
| | | .row-list .s1 { |
| | | color: #d35651; |
| | | .row-list { |
| | | height: 60rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | padding: 0px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .row-list ._label { |
| | | display: flex; |
| | | flex: 0.8; |
| | | color: #909399; |
| | | align-items: center; |
| | | |
| | | ._label-name { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 500; |
| | | color: #666666; |
| | | } |
| | | } |
| | | |
| | | .row-list ._content { |
| | | flex: 1.5; |
| | | text-align: right; |
| | | color: #909399; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | .row-list .s1 { |
| | | color: #d35651; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .registration-form-footer { |
| | | display: flex; |
| | | margin-top: 10rpx; |
| | | margin-bottom: 10rpx; |
| | | margin-left: 20rpx; |
| | | margin-right: 20rpx; |
| | | padding-bottom: 14rpx; |
| | | .registration-form-footer { |
| | | display: flex; |
| | | margin-top: 10rpx; |
| | | margin-bottom: 10rpx; |
| | | margin-left: 20rpx; |
| | | margin-right: 20rpx; |
| | | padding-bottom: 14rpx; |
| | | |
| | | .btn { |
| | | flex: 1; |
| | | margin: 10rpx; |
| | | background: #214DED; |
| | | box-shadow: 0rpx 6rpx 8rpx 0rpx rgba(4, 49, 212, 0.3); |
| | | font-weight: bold; |
| | | color: #FEFEFE; |
| | | font-family: PingFang SC; |
| | | .btn { |
| | | flex: 1; |
| | | margin: 10rpx; |
| | | background: #214DED; |
| | | box-shadow: 0rpx 6rpx 8rpx 0rpx rgba(4, 49, 212, 0.3); |
| | | font-weight: bold; |
| | | color: #FEFEFE; |
| | | font-family: PingFang SC; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <view class="packing-registration-bg" /> |
| | | <u-navbar title="æ ¸ç£
å½å
¥" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" |
| | | back-icon-color="#000" /> |
| | | <u-form :model="form" ref="uForm" :label-width="200" :rules="rules" :error-type="['toast']" class="uForm"> |
| | | <u-form-item label="产åç±»å" :border-bottom="false" prop="value0"> |
| | | <u-radio-group v-model="form.value0"> |
| | | <u-radio name="导ä½">导ä½</u-radio> |
| | | <u-radio name="éæ">éæ</u-radio> |
| | | <u-radio name="导ä½2.6">导ä½2.6</u-radio> |
| | | <u-form :model="form" ref="uForm" :label-width="210" labelAlign="left" :rules="rules" :error-type="['toast']" |
| | | class="uForm"> |
| | | <u-form-item label="产åç±»åï¼" :border-bottom="false" prop="productType"> |
| | | <u-radio-group v-model="form.productType" @change="handleProductTypeChange"> |
| | | <u-radio name="1">导ä½</u-radio> |
| | | <u-radio name="2">éæ</u-radio> |
| | | <u-radio name="3">导ä½2.6</u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="æ¿æ¢äºç»´ç " :border-bottom="false" prop="value1"> |
| | | <u-radio-group v-model="form.value1"> |
| | | <u-form-item label="æ¿æ¢äºç»´ç ï¼" :border-bottom="false" prop="replace"> |
| | | <u-radio-group v-model="form.replace"> |
| | | <u-radio name="1">æ¯</u-radio> |
| | | <u-radio name="0">å¦</u-radio> |
| | | </u-radio-group> |
| | | </u-form-item> |
| | | <u-form-item label="车çå·" :border-bottom="false" prop="value2"> |
| | | <u-input v-model="form.value2" type="select" placeholder="请è¾å
¥è½¦çå·" @click="lpn" /> |
| | | <u-form-item label="车çå·ï¼" :border-bottom="false" prop="licensePlate"> |
| | | <u-input v-model="form.licensePlate" type="select" placeholder="请è¾å
¥è½¦çå·" @click="lpn" /> |
| | | </u-form-item> |
| | | <u-form-item label="客æ·åç§°" :border-bottom="false" prop="value3"> |
| | | <u-form-item label="客æ·åç§°1ï¼" :border-bottom="false" prop="customerName1"> |
| | | <picker class="item-one item-two" style="width: 100%; text-align: right" |
| | | @change="locNoNumBindChange($event, locNoList)" :value="locNoNumIndex" :range="locNoList" |
| | | range-key="label"> |
| | | @change="selClientChange($event, selClientList, 'customerName1')" :value="selClientIndex1" |
| | | :range="selClientList" range-key="label"> |
| | | <view> |
| | | <text :style="{ color: locNoNumIndex == null ? '#a5abb4' : '#0c0c0c' }">{{ |
| | | locNoNumIndex == null |
| | | <text :style="{ |
| | | color: selClientIndex1 == null ? '#a5abb4' : '#0c0c0c', |
| | | }">{{ |
| | | selClientIndex1 == null |
| | | ? "è¯·éæ©" |
| | | : locNoList[locNoNumIndex].label |
| | | : selClientList[selClientIndex1].label |
| | | }}</text> |
| | | </view> |
| | | </picker> |
| | | <u-icon v-if="locNoNumIndex == null" name="arrow-right" color="#687792" size="28"></u-icon> |
| | | <u-icon v-if="selClientIndex1 == null" name="arrow-right" color="#687792" size="28"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="åè´§éç¥åå·" :border-bottom="false" prop="value4"> |
| | | <u-input v-model="form.value4" placeholder="" disabled /> |
| | | <u-form-item label="åè´§éç¥åå·1ï¼" :border-bottom="false" prop="shippingNoticeNo1"> |
| | | <u-input v-model="form.shippingNoticeNo1" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="ç产车é´" :border-bottom="false" prop="value5"> |
| | | <u-form-item label="客æ·åç§°2ï¼" :border-bottom="false" prop="customerName2"> |
| | | <picker class="item-one item-two" style="width: 100%; text-align: right" |
| | | @change="locNoNumBindChange($event, locNoList)" :value="locNoNumIndex" :range="locNoList" |
| | | range-key="label"> |
| | | @change="selClientChange($event, selClientList, 'customerName2')" :value="selClientIndex2" |
| | | :range="selClientList" range-key="label"> |
| | | <view> |
| | | <text :style="{ color: locNoNumIndex == null ? '#a5abb4' : '#0c0c0c' }">{{ |
| | | locNoNumIndex == null |
| | | <text :style="{ |
| | | color: selClientIndex2 == null ? '#a5abb4' : '#0c0c0c', |
| | | }">{{ |
| | | selClientIndex2 == null |
| | | ? "è¯·éæ©" |
| | | : locNoList[locNoNumIndex].label |
| | | : selClientList[selClientIndex2].label |
| | | }}</text> |
| | | </view> |
| | | </picker> |
| | | <u-icon v-if="locNoNumIndex == null" name="arrow-right" color="#687792" size="28"></u-icon> |
| | | <u-icon v-if="selClientIndex2 == null" name="arrow-right" color="#687792" size="28"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="å¸ç£
å" :border-bottom="false" prop="value6"> |
| | | <u-form-item label="åè´§éç¥åå·2ï¼" :border-bottom="false" prop="shippingNoticeNo2"> |
| | | <u-input v-model="form.shippingNoticeNo2" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="ç产车é´ï¼" :border-bottom="false" prop="workshop"> |
| | | <picker class="item-one item-two" style="width: 100%; text-align: right" |
| | | @change="locNoNumBindChange($event, locNoList)" :value="locNoNumIndex" :range="locNoList" |
| | | range-key="label"> |
| | | @change="workshopChange($event, workshopList)" :value="workshopIndex" :range="workshopList" |
| | | range-key="label" :disabled="!form.productType"> |
| | | <view> |
| | | <text :style="{ color: locNoNumIndex == null ? '#a5abb4' : '#0c0c0c' }">{{ |
| | | locNoNumIndex == null |
| | | <text :style="{ color: workshopIndex == null ? '#a5abb4' : '#0c0c0c' }">{{ |
| | | workshopIndex == null |
| | | ? "è¯·éæ©" |
| | | : locNoList[locNoNumIndex].label |
| | | : workshopList[workshopIndex].label |
| | | }}</text> |
| | | </view> |
| | | </picker> |
| | | <u-icon v-if="locNoNumIndex == null" name="arrow-right" color="#687792" size="28"></u-icon> |
| | | <u-icon v-if="workshopIndex == null" name="arrow-right" color="#687792" size="28"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="å车工" :border-bottom="false" prop="value7"> |
| | | <u-input v-model="form.value7" type="select" placeholder="è¯·éæ©" @click="openForkliftDriverList" /> |
| | | <u-form-item label="å¸ç£
åï¼" :border-bottom="false" prop="weighingOperator"> |
| | | <picker class="item-one item-two" style="width: 100%; text-align: right" |
| | | @change="weighmanChange($event, weighmanList)" :value="weighmanIndex" :range="weighmanList" |
| | | range-key="label"> |
| | | <view> |
| | | <text :style="{ color: weighmanIndex == null ? '#a5abb4' : '#0c0c0c' }">{{ |
| | | weighmanIndex == null |
| | | ? "è¯·éæ©" |
| | | : weighmanList[weighmanIndex].label |
| | | }}</text> |
| | | </view> |
| | | </picker> |
| | | <u-icon v-if="weighmanIndex == null" name="arrow-right" color="#687792" size="28"></u-icon> |
| | | </u-form-item> |
| | | <u-form-item label="å车工ï¼" :border-bottom="false" prop="forkliftOperator"> |
| | | <u-input v-model="form.forkliftOperator" type="select" placeholder="è¯·éæ©" |
| | | @click="openForkliftDriverList" /> |
| | | </u-form-item> |
| | | </u-form> |
| | | <u-button type="primary" class="bottom-button1" @click="submit">å建</u-button> |
| | | |
| | | <!--车çå· --> |
| | | <modalBg ref="modalBg" :confirm="confirm"> |
| | | <u-field v-model="form.value2" label="车çå·ï¼" placeholder="请è¾å
¥" :border-bottom="false"> |
| | | <u-field v-model="form.licensePlate" label="车çå·ï¼" placeholder="请è¾å
¥" :border-bottom="false"> |
| | | </u-field> |
| | | </modalBg> |
| | | <!-- å车工 --> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | checkboxList: [{ |
| | | label: "工人1", |
| | | value: "a", |
| | | checked: false, |
| | | }, |
| | | { |
| | | label: "工人2", |
| | | value: "2", |
| | | checked: false, |
| | | }, |
| | | { |
| | | label: "工人3", |
| | | value: "3", |
| | | checked: false, |
| | | }, |
| | | { |
| | | label: "工人4", |
| | | value: "4", |
| | | checked: false, |
| | | }, |
| | | { |
| | | label: "工人", |
| | | value: "5", |
| | | checked: false, |
| | | }, |
| | | ], |
| | | checkboxList: [], |
| | | background: { |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: "fixed", |
| | |
| | | show: false, |
| | | num: 1, |
| | | form: { |
| | | value0: "", |
| | | value1: "", |
| | | value2: "", |
| | | value3: "", |
| | | value4: "111", |
| | | value5: "", |
| | | value6: "", |
| | | value7: "", |
| | | value8: "", |
| | | replace: '0', |
| | | productType: '', |
| | | licensePlate: '', |
| | | customerName1: '', |
| | | shippingNoticeNo1: '', |
| | | customerName2: '', |
| | | shippingNoticeNo2: '', |
| | | workshop: '', |
| | | weighingOperator: '', |
| | | forkliftOperator: '', |
| | | }, |
| | | rules: { |
| | | value0: [{ |
| | | productType: [{ |
| | | required: true, |
| | | message: "è¯·éæ©äº§åç±»å", |
| | | trigger: ["change"], |
| | | }, ], |
| | | value1: [{ |
| | | replace: [{ |
| | | required: true, |
| | | message: "è¯·éæ©æ¯å¦æ¿æ¢äºç»´ç ", |
| | | trigger: ["change", "blur"], |
| | | }, ], |
| | | value2: [{ |
| | | licensePlate: [{ |
| | | required: true, |
| | | message: "请è¾å
¥è½¦çå·", |
| | | trigger: ["change", "blur"], |
| | | }, ], |
| | | // value3: [ |
| | | // { |
| | | // required: true, |
| | | // message: "è¯·éæ©å®¢æ·åç§°", |
| | | // trigger: ["change", "blur"], |
| | | // }, |
| | | // ], |
| | | value4: [{ |
| | | required: true, |
| | | message: "请è¾å
¥åè´§éç¥åå·", |
| | | trigger: ["change"], |
| | | }, ], |
| | | value5: [{ |
| | | workshop: [{ |
| | | required: true, |
| | | message: "è¯·éæ©ç产车é´", |
| | | trigger: ["change"], |
| | | }, ], |
| | | value6: [{ |
| | | weighingOperator: [{ |
| | | required: true, |
| | | message: "è¯·éæ©å¸ç£
å", |
| | | trigger: ["change"], |
| | | }, ], |
| | | value7: [{ |
| | | type: "array", |
| | | forkliftOperator: [{ |
| | | type: "string", |
| | | required: true, |
| | | message: "请è³å°éæ©ä¸ä¸ªå车工", |
| | | trigger: ["change"], |
| | | }, ], |
| | | }, |
| | | locNoList: [{ |
| | | value: "0", |
| | | label: "å
¬å¸1", |
| | | }, |
| | | { |
| | | value: "1", |
| | | label: "å
¬å¸2", |
| | | }, |
| | | { |
| | | value: "2", |
| | | label: "å
¬å¸3", |
| | | }, |
| | | { |
| | | value: "3", |
| | | label: "å
¬å¸4", |
| | | }, |
| | | { |
| | | value: "4", |
| | | label: "å
¬å¸5", |
| | | }, |
| | | { |
| | | value: "5", |
| | | label: "å
¬å¸6", |
| | | }, |
| | | ], |
| | | locNoNumIndex: null, |
| | | // 客æ·åç§° |
| | | selClientList: [], |
| | | selClientIndex1: null, |
| | | selClientIndex2: null, |
| | | // çäº§è½¦é´ |
| | | workshopList: [], |
| | | workshopIndex: null, |
| | | // å¸ç£
å |
| | | weighmanList: [], |
| | | weighmanIndex: null, |
| | | showModal: false, |
| | | selectedItems: [], |
| | | id1: '', |
| | | id2: '', |
| | | isSubmitting: false |
| | | }; |
| | | }, |
| | | onReady() { |
| | | this.$refs.uForm.setRules(this.rules); |
| | | // ä»
å¨ç»ä»¶å次å è½½æ¶è·åæ°æ® |
| | | if (this.selClientList.length === 0) { |
| | | this.fetchClients(); |
| | | } |
| | | if (this.workshopList.length === 0) { |
| | | this.fetchWorkshops(); |
| | | } |
| | | if (this.checkboxList.length === 0) { |
| | | this.fetchForkliftOperators(); |
| | | } |
| | | if (this.weighmanList.length === 0) { |
| | | this.fetchWeighmen(); |
| | | } |
| | | }, |
| | | onShow() {}, |
| | | onShow() { |
| | | // éç½®è¡¨åæ°æ® |
| | | this.form = { |
| | | replace: '0', |
| | | productType: '', |
| | | licensePlate: '', |
| | | customerName1: '', |
| | | shippingNoticeNo1: '', |
| | | customerName2: '', |
| | | shippingNoticeNo2: '', |
| | | workshop: '', |
| | | weighingOperator: '', |
| | | forkliftOperator: '', |
| | | }; |
| | | this.selClientIndex1 = null; |
| | | this.selClientIndex2 = null; |
| | | this.workshopIndex = null; |
| | | this.weighmanIndex = null; |
| | | this.checkboxList = this.checkboxList.map(item => ({ |
| | | ...item, |
| | | checked: false |
| | | })); |
| | | this.$refs.uForm && this.$refs.uForm.resetValidation(); |
| | | }, |
| | | methods: { |
| | | /** |
| | | * è·å客æ·å表 |
| | | */ |
| | | fetchClients() { |
| | | this.$u.api.NuclearScaleEntry.selClient().then((res) => { |
| | | console.log('客æ·åç§°', res) |
| | | if (res.code === 0) { |
| | | res.data.forEach((i) => { |
| | | const obj = Object.assign({ |
| | | label: i.customerName, |
| | | value: i.customerName, |
| | | shippingNoticeNo: i.shippingNoticeNo, |
| | | id: i.id |
| | | }); |
| | | this.selClientList.push(obj); |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.msg || 'è·å客æ·å称失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: 'ç½ç»é误ï¼è·å客æ·å称失败', |
| | | icon: 'none' |
| | | }); |
| | | console.error('è·å客æ·åç§°é误:', err); |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * è·å车é´å表 |
| | | */ |
| | | fetchWorkshops() { |
| | | this.$u.api.dictData({ |
| | | dictType: 'workshop' |
| | | }).then(res => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | res.data.forEach(i => { |
| | | const obj = Object.assign({ |
| | | label: i.label, |
| | | value: i.value, |
| | | }) |
| | | this.workshopList.push(obj) |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.msg || 'è·å车é´å表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: 'ç½ç»é误ï¼è·å车é´å表失败', |
| | | icon: 'none' |
| | | }); |
| | | console.error('è·å车é´å表é误:', err); |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * è·åå车工å表 |
| | | */ |
| | | fetchForkliftOperators() { |
| | | this.$u.api.dictData({ |
| | | dictType: 'forklift' |
| | | }).then(res => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | res.data.forEach(i => { |
| | | const obj = Object.assign({ |
| | | label: i.label, |
| | | value: i.label, |
| | | }) |
| | | this.checkboxList.push(obj) |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.msg || 'è·åå车工å表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: 'ç½ç»é误ï¼è·åå车工å表失败', |
| | | icon: 'none' |
| | | }); |
| | | console.error('è·åå车工å表é误:', err); |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * è·åå¸ç£
åå表 |
| | | */ |
| | | fetchWeighmen() { |
| | | this.$u.api.dictData({ |
| | | dictType: 'weighing' |
| | | }).then(res => { |
| | | if (res.code === 0 && res.data.length > 0) { |
| | | res.data.forEach(i => { |
| | | const obj = Object.assign({ |
| | | label: i.label, |
| | | value: i.label, |
| | | }) |
| | | this.weighmanList.push(obj) |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.msg || 'è·åå¸ç£
åå表失败', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: 'ç½ç»é误ï¼è·åå¸ç£
åå表失败', |
| | | icon: 'none' |
| | | }); |
| | | console.error('è·åå¸ç£
åå表é误:', err); |
| | | }); |
| | | }, |
| | | // å¤éæ¡ååäºä»¶ |
| | | checkboxChange(e) { |
| | | const values = e.detail.value; |
| | |
| | | |
| | | // ç¡®è®¤éæ© |
| | | confirmSelection() { |
| | | this.form.value7 = this.checkboxList |
| | | // å°éä¸çå车工æ ç¾æ°ç»è½¬ä¸ºä»¥éå·åéçå符串 |
| | | this.form.forkliftOperator = this.checkboxList |
| | | .filter((item) => item.checked) |
| | | .map((item) => item.label); |
| | | .map((item) => item.label) |
| | | .join(','); |
| | | }, |
| | | cancel() {}, |
| | | openForkliftDriverList() { |
| | | this.showModal = true; |
| | | }, |
| | | locNoNumBindChange(e, storage) { |
| | | // 客æ·åç§° |
| | | selClientChange(e, storage, code) { |
| | | if (storage.length <= 0) { |
| | | this.locNoNumIndex = null; |
| | | this.selClientIndex1 = null; |
| | | this.selClientIndex2 = null; |
| | | return; |
| | | } |
| | | this.locNoNumIndex = e.target.value; |
| | | this.form.value3 = storage[this.locNoNumIndex].label; |
| | | const selectedIndex = e.target.value; |
| | | const selectedCustomer = storage[selectedIndex]; |
| | | |
| | | // æ£æ¥æ¯å¦éæ©äºç¸åçå®¢æ· |
| | | if (code === "customerName1" && this.selClientIndex2 === selectedIndex) { |
| | | uni.showToast({ |
| | | title: 'ä¸è½éæ©ç¸åç客æ·', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | if (code === "customerName2" && this.selClientIndex1 === selectedIndex) { |
| | | uni.showToast({ |
| | | title: 'ä¸è½éæ©ç¸åç客æ·', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (code === "customerName2") { |
| | | this.selClientIndex2 = selectedIndex; |
| | | this.form.customerName2 = selectedCustomer.label; |
| | | this.form.shippingNoticeNo2 = selectedCustomer.shippingNoticeNo; |
| | | this.id2 = selectedCustomer.id; |
| | | } |
| | | if (code === "customerName1") { |
| | | this.selClientIndex1 = selectedIndex; |
| | | this.form.customerName1 = selectedCustomer.label; |
| | | this.form.shippingNoticeNo1 = selectedCustomer.shippingNoticeNo; |
| | | this.id1 = selectedCustomer.id |
| | | } |
| | | }, |
| | | // æå¼å¼¹æ¡--åé¢è¿éè¦ç嬿«ç æªæ«ç ç»æï¼èµå¼ç»æ¥å·¥åå·å段ï¼ç¶åæå¼å¼¹æ¡éæ©è®¢åå·çæä½ |
| | | // çäº§è½¦é´ |
| | | workshopChange(e, storage) { |
| | | if (storage.length <= 0) { |
| | | this.workshopIndex = null; |
| | | return; |
| | | } |
| | | |
| | | const productType = this.form.productType; |
| | | const selectedWorkshop = storage[e.target.value]; |
| | | |
| | | // æ£æ¥äº§åç±»åæ¯å¦ä¸ºéæ(å¼ä¸º2) |
| | | if (productType === '2') { |
| | | // éæåªè½éæ©éæç¸å
³è½¦é´ |
| | | if (!selectedWorkshop.label.includes('éæ')) { |
| | | uni.showModal({ |
| | | title: "æç¤º", |
| | | content: "éæäº§ååªè½éæ©éæç¸å
³è½¦é´", |
| | | showCancel: false |
| | | }); |
| | | return; |
| | | } |
| | | } else { |
| | | // 导ä½äº§åä¸è½éæ©éæè½¦é´ |
| | | if (selectedWorkshop.label.includes('éæ')) { |
| | | uni.showModal({ |
| | | title: "æç¤º", |
| | | content: "导ä½äº§åä¸è½éæ©éæè½¦é´", |
| | | showCancel: false |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | this.workshopIndex = e.target.value; |
| | | this.form.workshop = selectedWorkshop.label; |
| | | }, |
| | | // å¸ç£
å |
| | | weighmanChange(e, storage) { |
| | | if (storage.length <= 0) { |
| | | this.weighmanIndex = null; |
| | | return; |
| | | } |
| | | this.weighmanIndex = e.target.value; |
| | | this.form.weighingOperator = storage[this.weighmanIndex].label; |
| | | }, |
| | | lpn() { |
| | | this.$refs.modalBg.open(); |
| | | }, |
| | | // å¼¹æ¡ä¿å |
| | | confirm() { |
| | | console.log("ä¿å", this.form.value1); |
| | | // è¯·æ±æ¥å£ï¼æ ¹æ®å·¥åå·æ¥è¯¢å
¶ä»ä¿¡æ¯å¹¶èµå¼ |
| | | confirm() {}, |
| | | |
| | | /** |
| | | * 产åç±»åååæ¶æ¸
空车é´éæ© |
| | | */ |
| | | handleProductTypeChange() { |
| | | this.workshopIndex = null; |
| | | this.form.workshop = ''; |
| | | }, |
| | | // æäº¤æé® |
| | | submit() { |
| | | if (!this.$refs.uForm.validate()) { |
| | | console.log("1111"); |
| | | return; |
| | | async submit() { |
| | | if (this.isSubmitting) return; |
| | | |
| | | try { |
| | | // ç»ä¸è¡¨åéªè¯ |
| | | if (!await this.validateForm()) return; |
| | | |
| | | // æå»ºæäº¤æ°æ® |
| | | const submitData = this.buildSubmitData().customerList; |
| | | console.log('æäº¤çæ°æ®',submitData) |
| | | this.isSubmitting = true; |
| | | const res = await this.$u.api.NuclearScaleEntry.createMain(submitData); |
| | | |
| | | if (res.code === 0) { |
| | | this.$u.toast("æäº¤æå"); |
| | | uni.navigateBack(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.msg || 'æäº¤å¤±è´¥ï¼ä¸å¡å¤çé误', |
| | | icon: 'none' |
| | | }); |
| | | console.error('ä¸å¡é误:', res); |
| | | } |
| | | } catch (err) { |
| | | if (err.type === 'validation') { |
| | | uni.showToast({ |
| | | title: err.message, |
| | | icon: 'none' |
| | | }); |
| | | } else if (err.message.includes('Network Error')) { |
| | | uni.showToast({ |
| | | title: 'ç½ç»è¿æ¥é误ï¼è¯·æ£æ¥ç½ç»åéè¯', |
| | | icon: 'none' |
| | | }); |
| | | } else { |
| | | uni.showToast({ |
| | | title: 'ç³»ç»é误ï¼è¯·ç¨åéè¯', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | console.error('æäº¤è¡¨åé误:', err); |
| | | } finally { |
| | | this.isSubmitting = false; |
| | | } |
| | | if (this.form.value3 === "") { |
| | | uni.showToast({ |
| | | title: "请å
鿩客æ·åç§°", |
| | | icon: "none", |
| | | }); |
| | | return; |
| | | }, |
| | | |
| | | // ç»ä¸è¡¨åéªè¯ |
| | | async validateForm() { |
| | | // 使ç¨uView表åéªè¯ |
| | | if (!await this.$refs.uForm.validate()) { |
| | | return false; |
| | | } |
| | | |
| | | // 客æ·åç§°éªè¯ |
| | | if (!this.form.customerName1 || !this.form.customerName2) { |
| | | throw { type: 'validation', message: '请å
鿩客æ·åç§°' }; |
| | | } |
| | | |
| | | return true; |
| | | }, |
| | | |
| | | // æå»ºæäº¤æ°æ® |
| | | buildSubmitData() { |
| | | // åå»ºå®¢æ·æ°æ®çè¾
å©å½æ° |
| | | const createCustomerItem = (customerIndex) => ({ |
| | | customerName: this.form[`customerName${customerIndex}`], |
| | | shippingNoticeNo: this.form[`shippingNoticeNo${customerIndex}`], |
| | | shippingNoticeId: this[`id${customerIndex}`], |
| | | replace: this.form.replace, |
| | | productType: this.form.productType, |
| | | licensePlate: this.form.licensePlate, |
| | | workshop: this.form.workshop, |
| | | weighingOperator: this.form.weighingOperator, |
| | | forkliftOperator: this.form.forkliftOperator, |
| | | }); |
| | | |
| | | // æå»ºå®¢æ·å表 |
| | | const customerList = [1, 2].map(createCustomerItem); |
| | | |
| | | return { |
| | | customerList |
| | | }; |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | |
| | | /* å¤éæ¡æ ·å¼ */ |
| | | .checkbox-item { |
| | | width: 200px; |
| | | width: 230px; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 20rpx 0; |
| | | border-bottom: 1rpx solid #f5f5f5; |
| | | .label{ |
| | | background-color: #f8f9fa; |
| | | |
| | | .label { |
| | | position: relative; |
| | | left: 130px; |
| | | } |
| | |
| | | text-align: right !important; |
| | | } |
| | | .bottom-button { |
| | | position: fixed; |
| | | position: absolute; |
| | | bottom: 40rpx; |
| | | left: 45%; |
| | | width: calc(100% - 80rpx); |
| | |
| | | transform: translateX(-50%); |
| | | } |
| | | |
| | | .wrap .packing-registration-scroll-list { |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 800rpx); |
| | | width: 100%; |
| | | } |
| | | |
| | | .packing-registration-scroll-list-group { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: rgba(250, 252, 255, 0.36) !important; |
| | | padding: 0rpx 30rpx; |
| | | } |
| | | |
| | | .content { |
| | | font-size: 12px; |
| | | background-color: #ffffff; |
| | | box-sizing: border-box; |
| | | border-radius: 10rpx; |
| | | margin: 0rpx 0rpx 16rpx; |
| | | padding: 20rpx 8rpx; |
| | | box-shadow: none; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .content-header { |
| | | width: 40rpx; |
| | | height: 90rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .content-header-icon { |
| | | background-image: url("~@/static/custom/moveWareHouse/header_icon.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 28rpx; |
| | | width: 28rpx; |
| | | } |
| | | |
| | | .content-header-title { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: bold; |
| | | color: #626369; |
| | | } |
| | | } |
| | | |
| | | .content-body { |
| | | flex: 1; |
| | | background-color: #ffffff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | |
| | | .row-list { |
| | | height: 60rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | padding: 0px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .row-list ._label { |
| | | display: flex; |
| | | flex: 0.8; |
| | | color: #909399; |
| | | align-items: center; |
| | | |
| | | ._label-name { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 500; |
| | | color: #666666; |
| | | } |
| | | } |
| | | |
| | | .row-list ._content { |
| | | flex: 1.5; |
| | | text-align: right; |
| | | color: #909399; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | .row-list .s1 { |
| | | color: #d35651; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .packing-registration-param { |
| | | padding: 40rpx 30rpx 10rpx 30rpx; |
| | | height: 350px; |
| | | overflow: hidden; |
| | | |
| | | .packing-registration-param-title { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .title-label { |
| | | margin-left: 14rpx; |
| | | font-size: 34rpx; |
| | | font-weight: bold; |
| | | color: #283e65; |
| | | } |
| | | } |
| | | |
| | | .packing-registration-param-view { |
| | | height: 177rpx; |
| | | background-color: #fff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .packing-registration-param-item { |
| | | height: 90rpx; |
| | | border: 1px solid #adc8e4; |
| | | line-height: 90rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: none; |
| | | |
| | | .packing-registration-param-item-left { |
| | | .item-one { |
| | | font-size: 30rpx; |
| | | color: #666666; |
| | | } |
| | | } |
| | | |
| | | .packing-registration-param-item-right { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .item-one { |
| | | font-size: 15rpx; |
| | | color: #060505; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | .item-two { |
| | | font-size: 15rpx; |
| | | color: #a6b4cc; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | .item-three { |
| | | font-size: 30rpx; |
| | | color: #214ded; |
| | | margin-right: 6rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .param-extra { |
| | | border-bottom: 1px solid #ededed; |
| | | } |
| | | } |
| | | } |
| | | ::v-deep .u-model__title { |
| | | padding-top: 0 !important; |
| | | } |
| | | |
| | | ::v-deep .u-input__input { |
| | | text-align: right !important; |
| | | } |
| | | } |
| | | |
| | | .popup-content { |
| | | width: 600rpx; |
| | | height: 350rpx; |
| | | background-color: #fff; |
| | | border-radius: 8px; |
| | | z-index: 10; |
| | | /* ç¡®ä¿å
容å¨èçä¹ä¸ */ |
| | | } |
| | | |
| | | .packing-registration-param { |
| | | padding: 40rpx 30rpx 10rpx 30rpx; |
| | | |
| | | .packing-registration-param-title { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .title-label { |
| | | margin-left: 14rpx; |
| | | font-size: 34rpx; |
| | | font-weight: bold; |
| | | color: #283e65; |
| | | } |
| | | } |
| | | |
| | | .packing-registration-param-view { |
| | | height: 550rpx; |
| | | background-color: #fff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .packing-registration-param-item { |
| | | height: 90rpx; |
| | | border: 1px solid #adc8e4; |
| | | line-height: 90rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: none; |
| | | |
| | | .packing-registration-param-item-left { |
| | | .item-one { |
| | | font-size: 30rpx; |
| | | color: #666666; |
| | | } |
| | | } |
| | | |
| | | .packing-registration-param-item-right { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .item-one { |
| | | font-size: 30rpx; |
| | | color: #060505; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | .item-two { |
| | | font-size: 30rpx; |
| | | color: #a6b4cc; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | .item-three { |
| | | font-size: 30rpx; |
| | | color: #214ded; |
| | | margin-right: 6rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .param-extra { |
| | | border-bottom: 1px solid #ededed; |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <!-- æ ¸ç£
å½å
¥ --> |
| | | <div class="page"> |
| | | <view class="packing-registration-bg" /> |
| | | <u-navbar title="æ ¸ç£
å½å
¥" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" |
| | | back-icon-color="#000" /> |
| | | <u-form :model="form" ref="uForm" :label-width="200" :rules="rules" :error-type="['toast']" class="uForm"> |
| | | <u-form-item label="æ ¸ç£
åå·" :border-bottom="false" prop="value1"> |
| | | <u-input v-model="form.value1" type="select" placeholder="è¯·éæ©æ ¸ç£
åå·" @click="openList" /> |
| | | </u-form-item> |
| | | <u-form-item label="产åç±»å" :border-bottom="false" prop="value2"> |
| | | <u-input v-model="form.value2" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="车çå·" :border-bottom="false" prop="value3"> |
| | | <u-input v-model="form.value3" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="åè´§éç¥å1" :border-bottom="false" prop="value4"> |
| | | <u-input v-model="form.value4" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="客æ·åç§°1" :border-bottom="false" prop="value5"> |
| | | <u-input v-model="form.value5" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="åè´§éç¥å2" :border-bottom="false" prop="value4"> |
| | | <u-input v-model="form.value9" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="客æ·åç§°2" :border-bottom="false" prop="value5"> |
| | | <u-input v-model="form.value10" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="å¸ç£
å" :border-bottom="false" prop="value6"> |
| | | <u-input v-model="form.value6" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="åè½¦å¸æº" :border-bottom="false" prop="value7"> |
| | | <u-input v-model="form.value7" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="æ ¸ç£
è®°å½" :border-bottom="false" prop="value8"> |
| | | <u-input v-model="form.value8" type="select" placeholder="" @click="openNuclearScaleRecord" /> |
| | | </u-form-item> |
| | | <u-form-item :label="`æ«ç è®°å½(${num}æ¡)ï¼`" :border-bottom="false" prop="value4" :label-width="260"> |
| | | <!-- <u-input v-model="form.value4" placeholder="" disabled /> --> |
| | | </u-form-item> |
| | | </u-form> |
| | | <u-button type="primary" class="bottom-button" @click="submit">æäº¤</u-button> |
| | | <!-- æ ¸ç£
å½å
¥ --> |
| | | <div class="page"> |
| | | <view class="packing-registration-bg" /> |
| | | <u-navbar title="æ ¸ç£
å½å
¥" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" |
| | | back-icon-color="#000" /> |
| | | <u-form :model="form" ref="uForm" :label-width="200" :rules="rules" :error-type="['toast']" class="uForm"> |
| | | <u-form-item label="æ ¸ç£
åå·" :border-bottom="false" prop="verificationNo"> |
| | | <u-input v-model="form.verificationNo" type="select" placeholder="è¯·éæ©æ ¸ç£
åå·" @click="openList" /> |
| | | </u-form-item> |
| | | <u-form-item label="产åç±»å" :border-bottom="false" prop="productType"> |
| | | <u-input v-model="productTypeMap[form.productType] || form.productType" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="车çå·" :border-bottom="false" prop="licensePlate"> |
| | | <u-input v-model="form.licensePlate" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="åè´§éç¥å1" :border-bottom="false" prop="shippingNoticeNo1"> |
| | | <u-input v-model="form.shippingNoticeNo1" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="客æ·åç§°1" :border-bottom="false" prop="customerName1"> |
| | | <u-input v-model="form.customerName1" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="åè´§éç¥å2" :border-bottom="false" prop="shippingNoticeNo2"> |
| | | <u-input v-model="form.shippingNoticeNo2" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="客æ·åç§°2" :border-bottom="false" prop="customerName2"> |
| | | <u-input v-model="form.customerName2" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="å¸ç£
å" :border-bottom="false" prop="weighingOperator"> |
| | | <u-input v-model="form.weighingOperator" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="åè½¦å¸æº" :border-bottom="false" prop="forkliftOperator"> |
| | | <u-input v-model="form.forkliftOperator" placeholder="" disabled /> |
| | | </u-form-item> |
| | | <u-form-item label="æ ¸ç£
è®°å½" :border-bottom="false" prop="value8"> |
| | | <u-input type="select" placeholder="" @click="openNuclearScaleRecord" /> |
| | | </u-form-item> |
| | | <u-form-item :label="`æ«ç è®°å½(${ScanCodeRecord.length}æ¡)ï¼`" :border-bottom="false" prop="shippingNoticeNo1" |
| | | :label-width="260"> |
| | | </u-form-item> |
| | | </u-form> |
| | | <view class="wrap"> |
| | | <scroll-view class="packing-registration-scroll-list" scroll-y="true"> |
| | | <u-cell-group class="packing-registration-scroll-list-group" :border="false"> |
| | | <view class="content" v-for="(item, index) in ScanCodeRecord" :key="index" :index="index" |
| | | @click="cancelReport(item)"> |
| | | <view class="content-header"> |
| | | <view class="content-header-title">{{ index + 1 }}</view> |
| | | </view> |
| | | <view class="content-body"> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-name">æ¹å·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.outBatchNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-name">é¶ä»¶æè¿°ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.netWeight }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-name">é¶ä»¶å·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.partNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-name">æ¯éï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.grossWeight }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-name">çéï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.trayWeight }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-name">åéï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.netWeight }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | </scroll-view> |
| | | </view> |
| | | <!-- å¯¼ä½ --> |
| | | <u-modal v-model="showModal" title="" :show-cancel-button="true" :show-confirm-button="true" |
| | | @confirm="confirmDt" @cancel="cancelDt"> |
| | | <view class="popup-content"> |
| | | <view class="packing-registration-param"> |
| | | <view class="packing-registration-param-view"> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">æ ¸ç£
ééï¼</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input class="item-one item-two" v-model="modalList.suppliedQuantity" /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">å车çéï¼</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input class="item-one item-two" v-model="modalList.suppliedQuantity" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-modal> |
| | | <u-button type="primary" class="bottom-button" @click="submit">æäº¤</u-button> |
| | | <u-modal v-model="show" @confirm="confirm" content="æ¯å¦ç¡®è®¤æäº¤" show-cancel-button></u-modal> |
| | | <scan></scan> |
| | | </div> |
| | | <saveForm ref="saveForm" :operationTaskList="this.form" @update="handleUpdate" /> |
| | | <scan></scan> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import scan from "@/components/scan/scan.vue"; |
| | | import content_bg from '@/static/custom/packing/backBg.png' |
| | | export default { |
| | | components: { scan }, |
| | | data() { |
| | | return { |
| | | background: { |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | show:false, |
| | | num:1, |
| | | form: { |
| | | value0: '', |
| | | value1: '', |
| | | value2: '', |
| | | value3: '', |
| | | value4: '', |
| | | value5: '', |
| | | value6: '', |
| | | value7: '', |
| | | value8: '', |
| | | value9: '', |
| | | value10:'', |
| | | }, |
| | | rules: { |
| | | value1: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©æ ¸ç£
åå·', |
| | | trigger: ['change', 'blur'], |
| | | }, |
| | | ], |
| | | }, |
| | | } |
| | | }, |
| | | onReady() { |
| | | this.$refs.uForm.setRules(this.rules); |
| | | }, |
| | | onShow() { |
| | | let that = this |
| | | uni.$off('scan') // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on('scan', function (data) { |
| | | console.log('onscan'); |
| | | //æ«ç æååçåè°ï¼ä½ å¯ä»¥åèªå·±çé»è¾ä»£ç å¨è¿é |
| | | console.log('页颿«ç ç»æï¼', data.code); |
| | | if (data.code) { |
| | | let codeInfo = JSON.parse(data.code) |
| | | if (codeInfo.WorkNo) { |
| | | // æ«ææ¥å·¥åäºç»´ç |
| | | that.saveForm(codeInfo); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | methods: { |
| | | // æäº¤æé® |
| | | submit() { |
| | | this.show = true |
| | | }, |
| | | // å¼¹æ¡ä¿å |
| | | confirm() { |
| | | console.log('ä¿å', this.form.value1); |
| | | // è¯·æ±æ¥å£ï¼æ ¹æ®å·¥åå·æ¥è¯¢å
¶ä»ä¿¡æ¯å¹¶èµå¼ |
| | | }, |
| | | // éæ©è®¢åå· |
| | | openList() { |
| | | uni.navigateTo({ |
| | | url: '/pages/wareHouse/nuclearScale/nuclearScaleList' |
| | | }) |
| | | }, |
| | | //æ ¸ç£
è®°å½ |
| | | openNuclearScaleRecord() { |
| | | uni.navigateTo({ |
| | | url: '/pages/wareHouse/nuclearScale/nuclearscalerecord' |
| | | }) |
| | | }, |
| | | // å订åå· |
| | | setNo(val) { |
| | | this.form.value3 = val |
| | | }, |
| | | // åæ¾æ«ç çä¿¡æ¯-æ¥å·¥å |
| | | saveForm(val) { |
| | | let { WorkNo, ProcessName, ORDER_NO } = val |
| | | this.form.value1 = WorkNo |
| | | this.form.value2 = ProcessName |
| | | this.form.value3 = ORDER_NO |
| | | } |
| | | } |
| | | } |
| | | import scan from "@/components/scan/scan.vue"; |
| | | import content_bg from "@/static/custom/packing/backBg.png"; |
| | | import saveForm from "./saveForm.vue"; |
| | | export default { |
| | | components: { |
| | | scan, |
| | | saveForm, |
| | | }, |
| | | data() { |
| | | return { |
| | | modalList: {}, |
| | | showModal: false, |
| | | productTypeMap: { |
| | | 1: "导ä½", |
| | | 2: "éæ", |
| | | 3: "导ä½2.6", |
| | | }, |
| | | ScanCodeRecord: [], |
| | | background: { |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: "fixed", |
| | | backgroundSize: "100% auto", |
| | | backgroundRepeat: "no-repeat", |
| | | }, |
| | | show: false, |
| | | form: { |
| | | value0: "", |
| | | verificationNo: "", |
| | | productType: "", |
| | | licensePlate: "", |
| | | shippingNoticeNo1: "", |
| | | customerName1: "", |
| | | weighingOperator: "", |
| | | forkliftOperator: "", |
| | | value8: "", |
| | | shippingNoticeNo2: "", |
| | | customerName2: "", |
| | | }, |
| | | rules: { |
| | | verificationNo: [{ |
| | | required: true, |
| | | message: "è¯·éæ©æ ¸ç£
åå·", |
| | | trigger: ["change", "blur"], |
| | | }, ], |
| | | }, |
| | | }; |
| | | }, |
| | | onReady() { |
| | | this.$refs.uForm.setRules(this.rules); |
| | | }, |
| | | onShow() { |
| | | let that = this; |
| | | uni.$off("scan"); // æ¯æ¬¡è¿æ¥å
ç§»é¤å
¨å±èªå®ä¹äºä»¶çå¬å¨ |
| | | uni.$on("scan", function(data) { |
| | | console.log("onscan"); |
| | | if (that.form.verificationNo == "") { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: "请å
éæ©æ ¸ç£
åå·ï¼", |
| | | duration: 2 * 1000, |
| | | }); |
| | | return; |
| | | } |
| | | //æ«ç æååçåè°ï¼ä½ å¯ä»¥åèªå·±çé»è¾ä»£ç å¨è¿é |
| | | console.log("页颿«ç ç»æï¼", data.code); |
| | | if (data.code) { |
| | | try { |
| | | let codeInfo = JSON.parse(data.code); |
| | | } catch (e) { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: "æ«ç æ°æ®è§£æå¤±è´¥ï¼è¯·éè¯ï¼", |
| | | duration: 2 * 1000, |
| | | }); |
| | | return; |
| | | } |
| | | if (codeInfo.CN != that.form.customerName1) { |
| | | // æ«ææ¥å·¥åäºç»´ç |
| | | uni.showModal({ |
| | | title: "æç¤º", |
| | | content: "客æ·ä¸ä¸è´ï¼" + |
| | | codeInfo.CN + |
| | | "||" + |
| | | that.form.customerName1, |
| | | showCancel: true, |
| | | success: function() { |
| | | if (that.form.productType == "2") { |
| | | that.$refs.saveForm.open(codeInfo); |
| | | } else { |
| | | that.ScanCodeRecord.push(codeInfo); |
| | | } |
| | | }, |
| | | }); |
| | | } else { |
| | | if (that.form.productType == "2") { |
| | | that.$refs.saveForm.open(codeInfo); |
| | | } else { |
| | | that.ScanCodeRecord.push(codeInfo); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | // åæ¶æ«ç è®°å½ |
| | | cancelReport(item) { |
| | | this.ScanCodeRecord = this.ScanCodeRecord.filter(a => a.outBatchNo !== item.outBatchNo); |
| | | }, |
| | | // å¯¼ä½æäº¤ |
| | | confirmDt() { |
| | | const magnetic = |
| | | Number(this.form.h) - Number(this.form.children) - Number(this.form.m); |
| | | console.log("ä¿å", this.form.verificationNo); |
| | | switch (this.form.productType) { |
| | | case "导ä½": |
| | | if (magnetic > 0 && magnetic < 3) { |
| | | this.ScanCodeRecord.push(this.form); |
| | | } else { |
| | | this.$u.toast("çäº§æ ¸æ¥"); |
| | | } |
| | | break; |
| | | case "导ä½2.6": |
| | | if (magnetic > -0.5 && magnetic < 0.5) { |
| | | this.ScanCodeRecord.push(this.form); |
| | | } else { |
| | | this.$u.toast("çäº§æ ¸æ¥"); |
| | | } |
| | | break; |
| | | } |
| | | }, |
| | | // åæ¶ |
| | | cancelDt() { |
| | | this.showModal = false; |
| | | }, |
| | | handleUpdate(Obj) { |
| | | this.ScanCodeRecord.push(Obj); |
| | | }, |
| | | // æäº¤æé® |
| | | submit() { |
| | | this.showModal = true; |
| | | }, |
| | | // å¼¹æ¡ä¿å |
| | | confirm() { |
| | | console.log("ä¿å", this.form.verificationNo); |
| | | // è¯·æ±æ¥å£ï¼æ ¹æ®å·¥åå·æ¥è¯¢å
¶ä»ä¿¡æ¯å¹¶èµå¼ |
| | | }, |
| | | // éæ©è®¢åå· |
| | | openList() { |
| | | uni.navigateTo({ |
| | | url: "/pages/wareHouse/nuclearScale/nuclearScaleList", |
| | | }); |
| | | }, |
| | | //æ ¸ç£
è®°å½ |
| | | openNuclearScaleRecord() { |
| | | if (this.form.verificationNo == "") { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: "请å
éæ©æ ¸ç£
åå·ï¼", |
| | | duration: 2 * 1000, |
| | | }); |
| | | return; |
| | | } |
| | | uni.navigateTo({ |
| | | url: "/pages/wareHouse/nuclearScale/nuclearscalerecord", |
| | | }); |
| | | }, |
| | | // å订åå· |
| | | setNo(val) { |
| | | this.form = val; |
| | | }, |
| | | // åæ¾æ«ç çä¿¡æ¯-æ¥å·¥å |
| | | // saveForm(val) { |
| | | // let { |
| | | // WorkNo, |
| | | // ProcessName, |
| | | // ORDER_NO |
| | | // } = val; |
| | | // this.form.verificationNo = WorkNo; |
| | | // this.form.productType = ProcessName; |
| | | // this.form.licensePlate = ORDER_NO; |
| | | // }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import 'index.scss'; |
| | | @import "index.scss"; |
| | | </style> |
| | |
| | | <template> |
| | | <view class="page"> |
| | | <view class="finishProductIn-locno-bg" /> |
| | | <u-navbar |
| | | title="æ ¸ç£
åå·" |
| | | :background="background" |
| | | :border-bottom="false" |
| | | :title-bold="true" |
| | | title-color="#000" |
| | | back-icon-color="#000" |
| | | /> |
| | | <view class="finishProductIn-locno-search"> |
| | | <u-search |
| | | v-model="keywords" |
| | | shape="square" |
| | | bg-color="rgba(250,252,255,0.36)" |
| | | :show-action="false" |
| | | placeholder="请è¾å
¥æ ¸ç£
åå·" |
| | | @clear="search" |
| | | @custom="search" |
| | | @search="search" |
| | | > |
| | | </u-search> |
| | | </view> |
| | | <view class="wrap"> |
| | | <scroll-view |
| | | class="finishProductIn-locno-scroll-list" |
| | | scroll-y="true" |
| | | @scrolltolower="loadMore" |
| | | > |
| | | <u-cell-group |
| | | class="finishProductIn-locno-scroll-list-group" |
| | | :border="false" |
| | | > |
| | | <view |
| | | class="content" |
| | | v-for="(item, index) in list" |
| | | :key="item.locNo" |
| | | :index="index" |
| | | @click="selectNo(item.index)" |
| | | > |
| | | <view class="content-header"> |
| | | <view class="content-header-title">{{ index + 1 }}</view> |
| | | </view> |
| | | <view class="content-body"> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">æ ¸æ¦åå·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value0 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">产åç±»åï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value1 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> </view> |
| | | <view class="_label-name">车çå·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value2 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">åè´§éç¥ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value3 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">客æ·åç§°ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value4 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> </view> |
| | | <view class="_label-name">ç产车é´ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value5 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">å¸ç£
åï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value6 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">åè½¦å¸æºï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value7 }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <view class="plus-button" @click="openCreateWriteOffForm"> |
| | | <text class="plus-sign">+</text> |
| | | </view> |
| | | </view> |
| | | <view class="page"> |
| | | <view class="finishProductIn-locno-bg" /> |
| | | <u-navbar title="æ ¸ç£
åå·" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" |
| | | back-icon-color="#000" /> |
| | | <view class="finishProductIn-locno-search"> |
| | | <u-search v-model="keywords" shape="square" bg-color="rgba(250,252,255,0.36)" :show-action="false" |
| | | placeholder="请è¾å
¥æ ¸ç£
åå·" @clear="search" @custom="search" @search="search"> |
| | | </u-search> |
| | | </view> |
| | | <view class="wrap"> |
| | | <scroll-view class="finishProductIn-locno-scroll-list" scroll-y="true" @scrolltolower="getmoreList()"> |
| | | <u-skeleton v-if="isLoading && list.length === 0" type="list" :row="5" :loading="isLoading" /> |
| | | <u-cell-group class="finishProductIn-locno-scroll-list-group" :border="false"> |
| | | <view v-if="list.length === 0 && !isLoading" class="empty-tips"> |
| | | <text>ææ æ°æ®</text> |
| | | </view> |
| | | <view class="content" v-for="(item, index) in list" :key="item.verificationNo" :index="index" |
| | | @click="selectNo(item)"> |
| | | <view class="content-header"> |
| | | <view class="content-header-title">{{ index + 1 }}</view> |
| | | </view> |
| | | <view class="content-body"> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">æ ¸æ¦åå·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.verificationNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">产åç±»åï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ formatProductType(item.productType) }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> </view> |
| | | <view class="_label-name">车çå·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.licensePlate }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">åè´§éç¥1ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.shippingNoticeNo1 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">客æ·åç§°1ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.customerName1 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">åè´§éç¥2ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.shippingNoticeNo2 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">客æ·åç§°2ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.customerName2 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> </view> |
| | | <view class="_label-name">ç产车é´ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.workshop }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">å¸ç£
åï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.weighingOperator }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">åè½¦å¸æºï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.forkliftOperator }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="getmoreList()"> |
| | | <u-loadmore :status="status" :load-text="loadText" @loadmore="getmoreList()" /> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <view class="plus-button" @click="openCreateWriteOffForm"> |
| | | <text class="plus-sign">+</text> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import content_bg from "@/static/custom/finishProductIn/locNoBg.png"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | background: { |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: "fixed", |
| | | backgroundSize: "100% auto", |
| | | backgroundRepeat: "no-repeat", |
| | | }, |
| | | keywords: "", |
| | | alllist: [], |
| | | originList: [], |
| | | query: { |
| | | current: 1, |
| | | size: 10, |
| | | }, |
| | | list: [ |
| | | { |
| | | value0: "123456789", |
| | | value1: "123456789", |
| | | value2: "123456789", |
| | | value3: "123456789", |
| | | value4: "123456789", |
| | | value5: "123456789", |
| | | value6: "123456789", |
| | | value7: "123456789", |
| | | }, |
| | | { |
| | | value0: "123456789", |
| | | value1: "123456789", |
| | | value2: "123456789", |
| | | value3: "123456789", |
| | | value4: "123456789", |
| | | value5: "123456789", |
| | | value6: "123456789", |
| | | value7: "123456789", |
| | | }, |
| | | ], |
| | | count: 0, |
| | | loadStatus: "loading", |
| | | }; |
| | | import content_bg from "@/static/custom/finishProductIn/locNoBg.png"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | background: { |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: "fixed", |
| | | backgroundSize: "100% auto", |
| | | backgroundRepeat: "no-repeat", |
| | | }, |
| | | keywords: "", |
| | | list: [], |
| | | total: 0, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | status: 'loading', |
| | | isLoading: false, |
| | | loadText: { |
| | | loadmore: "å è½½æ´å¤...", |
| | | loading: "åªåå è½½ä¸...", |
| | | nomore: "æ²¡ææ´å¤äº", |
| | | }, |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.getlist(); |
| | | }, |
| | | onLoad() { |
| | | this.$u.api.finishProductIn.fetchList().then((res) => { |
| | | this.alllist = res.data; |
| | | this.originList = res.data; |
| | | this.loadList(); |
| | | }); |
| | | }, |
| | | methods: { |
| | | //åå»ºæ ¸éå |
| | | openCreateWriteOffForm() { |
| | | uni.navigateTo({ |
| | | url: '/pages/wareHouse/nuclearScale/createwriteoffform' |
| | | }) |
| | | }, |
| | | loadMore() { |
| | | if (this.loadStatus == "nomore" || this.loadStatus == "loading") { |
| | | return; |
| | | } |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | loadList() { |
| | | const data = this.originList.slice( |
| | | (this.query.current - 1) * this.query.size, |
| | | this.query.current * this.query.size |
| | | ); |
| | | this.list = this.list.concat(data); |
| | | this.loadStatus = "loadmore"; |
| | | if (!data || data.length < this.query.size) { |
| | | this.loadStatus = "nomore"; |
| | | } |
| | | }, |
| | | search(value) { |
| | | this.list = []; |
| | | this.query.current = 1; |
| | | if (value) { |
| | | this.originList = this.alllist.filter((item) => |
| | | item.locNo.includes(value) |
| | | ); |
| | | } else { |
| | | this.originList = this.alllist; |
| | | } |
| | | this.loadList(); |
| | | }, |
| | | selectNo(no) { |
| | | this.refreshLastPage(no); |
| | | }, |
| | | onShow() { |
| | | this.getlist(); |
| | | }, |
| | | methods: { |
| | | //åå»ºæ ¸éå |
| | | openCreateWriteOffForm() { |
| | | uni.navigateTo({ |
| | | url: '/pages/wareHouse/nuclearScale/createwriteoffform' |
| | | }) |
| | | }, |
| | | getmoreList() { |
| | | if (this.pageSize >= this.total) { |
| | | this.status = "nomore"; |
| | | return; |
| | | } |
| | | this.isLoading = true; |
| | | this.status = "loading"; |
| | | setTimeout(() => { |
| | | this.pageSize += this.pageSize; |
| | | this.getlist(); |
| | | }, 1000); |
| | | }, |
| | | getlist() { |
| | | this.isLoading = true; |
| | | this.$u.api.NuclearScaleEntry |
| | | .getWeighingOrder({ |
| | | current: this.pageNum, |
| | | size: this.pageSize |
| | | }) |
| | | .then((res) => { |
| | | this.handleListResponse(res); |
| | | }) |
| | | .catch((err) => { |
| | | this.handleApiError(err); |
| | | }) |
| | | .finally(() => { |
| | | this.isLoading = false; |
| | | }); |
| | | }, |
| | | |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(no) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages(); |
| | | getmoreList() { |
| | | if (this.isLoading || this.pageSize >= this.total) { |
| | | return; |
| | | } |
| | | this.isLoading = true; |
| | | this.status = "loading"; |
| | | setTimeout(() => { |
| | | this.pageSize += this.pageSize; |
| | | this.getlist(); |
| | | }, 500); |
| | | }, |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2]; |
| | | // æç´¢ç¸å
³æ¹æ³ |
| | | search(value) { |
| | | if (value) { |
| | | this.list = []; |
| | | this.pageSize = 10; |
| | | this.isLoading = true; |
| | | this.$u.api.NuclearScaleEntry |
| | | .getWeighingOrder({ |
| | | current: this.pageNum, |
| | | size: this.pageSize, |
| | | verificationNo: value, |
| | | }) |
| | | .then((res) => { |
| | | this.handleListResponse(res); |
| | | }) |
| | | .catch((err) => { |
| | | this.handleApiError(err); |
| | | }) |
| | | .finally(() => { |
| | | this.isLoading = false; |
| | | }); |
| | | } else { |
| | | this.getlist(); |
| | | } |
| | | }, |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.setNo(no); |
| | | // å·¥å
·æ¹æ³ |
| | | handleListResponse(res) { |
| | | console.log('API Response:', res); |
| | | console.log('Response Code:', res.code); |
| | | console.log('Response Data:', res.data); |
| | | console.log('Response Records:', res.data ? res.data.records : 'res.data is undefined'); |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1, |
| | | }); |
| | | }, |
| | | // æ°å¢æé® |
| | | handleClick() { |
| | | console.log("æé®è¢«ç¹å»"); |
| | | }, |
| | | }, |
| | | }; |
| | | if (res.code != 0) { |
| | | uni.showToast({ |
| | | title: res.msg || 'è·åæ°æ®å¤±è´¥', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (!res.data) { |
| | | console.error('res.data is undefined'); |
| | | uni.showToast({ |
| | | title: 'æ°æ®æ ¼å¼é误', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | this.list = res.data.records || []; |
| | | this.total = res.data.total || 0; |
| | | this.status = this.pageSize >= this.total ? "nomore" : "loadmore"; |
| | | }, |
| | | |
| | | handleApiError(err) { |
| | | console.error('API请æ±å¤±è´¥:', err); |
| | | uni.showToast({ |
| | | title: 'ç½ç»å¼å¸¸ï¼è¯·ç¨åéè¯', |
| | | icon: 'none' |
| | | }); |
| | | }, |
| | | formatProductType(type) { |
| | | const productTypeMap = { |
| | | 1: '导ä½', |
| | | 2: 'éæ', |
| | | 3: '导ä½2.6' |
| | | }; |
| | | return productTypeMap[type] || type; |
| | | }, |
| | | selectNo(no) { |
| | | this.refreshLastPage(no); |
| | | }, |
| | | |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(no) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages(); |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2]; |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.setNo(no); |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1, |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .plus-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 50%; |
| | | background-color: #007aff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | position: fixed; |
| | | bottom: 40px; |
| | | right: 10px; |
| | | z-index: 100; |
| | | } |
| | | .plus-sign { |
| | | color: white; |
| | | font-size: 50px; |
| | | position: relative; |
| | | bottom: 4px; |
| | | .plus-button { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 50%; |
| | | background-color: #007aff; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | position: fixed; |
| | | bottom: 40px; |
| | | right: 10px; |
| | | z-index: 100; |
| | | } |
| | | |
| | | } |
| | | .finishProductIn-locno-bg { |
| | | background-color: #f6f9ff; |
| | | background-image: url("~@/static/custom/finishProductIn/locNoBg.png"); |
| | | // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0)); |
| | | padding: 0 20rpx; |
| | | background-attachment: fixed; |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | .plus-sign { |
| | | color: white; |
| | | font-size: 50px; |
| | | position: relative; |
| | | bottom: 4px; |
| | | |
| | | .finishProductIn-locno-search { |
| | | padding: 40rpx 30rpx 20rpx 30rpx; |
| | | } |
| | | } |
| | | |
| | | .wrap .finishProductIn-locno-scroll-list { |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 242rpx); |
| | | width: 100%; |
| | | } |
| | | .finishProductIn-locno-bg { |
| | | background-color: #f6f9ff; |
| | | background-image: url("~@/static/custom/finishProductIn/locNoBg.png"); |
| | | // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0)); |
| | | padding: 0 20rpx; |
| | | background-attachment: fixed; |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .finishProductIn-locno-scroll-list-group { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: rgba(250, 252, 255, 0.36) !important; |
| | | padding: 0rpx 30rpx; |
| | | } |
| | | .finishProductIn-locno-search { |
| | | padding: 40rpx 30rpx 20rpx 30rpx; |
| | | } |
| | | |
| | | .content { |
| | | font-size: 12px; |
| | | background-color: #ffffff; |
| | | box-sizing: border-box; |
| | | border-radius: 10rpx; |
| | | margin: 0rpx 0rpx 16rpx; |
| | | padding: 20rpx 8rpx; |
| | | box-shadow: none; |
| | | display: flex; |
| | | align-items: center; |
| | | .wrap .finishProductIn-locno-scroll-list { |
| | | height: calc(100vh - var(--window-top, 0) - var(--window-bottom, 0) - 242rpx); |
| | | width: 100%; |
| | | min-height: 300rpx; /* æ·»å æå°é«åº¦ç¡®ä¿å
ç´ å§ç»å¯è§ */ |
| | | } |
| | | |
| | | .content-header { |
| | | width: 40rpx; |
| | | height: 90rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | .finishProductIn-locno-scroll-list-group { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: rgba(250, 252, 255, 0.36) !important; |
| | | padding: 0rpx 30rpx; |
| | | } |
| | | |
| | | .content-header-icon { |
| | | background-image: url("~@/static/custom/moveWareHouse/header_icon.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 28rpx; |
| | | width: 28rpx; |
| | | } |
| | | .content { |
| | | font-size: 12px; |
| | | background-color: #ffffff; |
| | | box-sizing: border-box; |
| | | border-radius: 10rpx; |
| | | margin: 0rpx 0rpx 16rpx; |
| | | padding: 20rpx 8rpx; |
| | | box-shadow: none; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .content-header-title { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: bold; |
| | | color: #3d52f5; |
| | | } |
| | | } |
| | | .content-header { |
| | | width: 40rpx; |
| | | height: 90rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .content-body { |
| | | flex: 1; |
| | | background: #f5f9ff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | .content-header-icon { |
| | | background-image: url("~@/static/custom/moveWareHouse/header_icon.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 28rpx; |
| | | width: 28rpx; |
| | | } |
| | | |
| | | .row-list { |
| | | height: 60rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | padding: 0px; |
| | | align-items: center; |
| | | } |
| | | .content-header-title { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: bold; |
| | | color: #3d52f5; |
| | | } |
| | | } |
| | | |
| | | .row-list ._label { |
| | | display: flex; |
| | | flex: 0.8; |
| | | color: #909399; |
| | | align-items: center; |
| | | .content-body { |
| | | flex: 1; |
| | | background: #f5f9ff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | |
| | | ._label-icon-1 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-1.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | .row-list { |
| | | height: 60rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | padding: 0px; |
| | | align-items: center; |
| | | } |
| | | |
| | | ._label-icon-2 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-2.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | .row-list ._label { |
| | | display: flex; |
| | | flex: 0.8; |
| | | color: #909399; |
| | | align-items: center; |
| | | |
| | | ._label-icon-3 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-3.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | ._label-icon-1 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-1.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | |
| | | ._label-name { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 500; |
| | | color: #666666; |
| | | } |
| | | } |
| | | ._label-icon-2 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-2.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | |
| | | .row-list ._content { |
| | | flex: 1.5; |
| | | text-align: right; |
| | | color: #909399; |
| | | font-size: 24rpx; |
| | | } |
| | | ._label-icon-3 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-3.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | |
| | | .row-list .s1 { |
| | | color: #d35651; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | ._label-name { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 500; |
| | | color: #666666; |
| | | } |
| | | } |
| | | |
| | | .row-list ._content { |
| | | flex: 1.5; |
| | | text-align: right; |
| | | color: #909399; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | .row-list .s1 { |
| | | color: #d35651; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="page"> |
| | | <view class="finishProductIn-locno-bg" /> |
| | | <u-navbar title="æ ¸ç£
è®°å½" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" |
| | | back-icon-color="#000"> |
| | | <view class="navbar-right" slot="right" @click="goPrintAll"> |
| | | å
¨é¨æå° |
| | | </view> |
| | | </u-navbar> |
| | | <view class="wrap"> |
| | | <scroll-view class="finishProductIn-locno-scroll-list" scroll-y="true" @scrolltolower="loadMore"> |
| | | <u-cell-group class="finishProductIn-locno-scroll-list-group" :border="false"> |
| | | <view class="content" v-for="(item, index) in list" :key="item.locNo" :index="index" @click="selectNo(item)"> |
| | | <view class="content-header"> |
| | | <view class="content-header-title">{{ index + 1 }}</view> |
| | | </view> |
| | | <view class="content-body"> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">æ¹æ¬¡å·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value0 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">产åæè¿°ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value1 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> </view> |
| | | <view class="_label-name">é¶ä»¶å·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value2 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">æ¯éï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value3 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">çéï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value4 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> </view> |
| | | <view class="_label-name">åéï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value5 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">æ ¸ç£
ééï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value6 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">å车çéï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value7 }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="loadMore"> |
| | | <u-loadmore :status="loadStatus"></u-loadmore> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | <view v-if="maskShow" class="uni-mask" @touchmove.stop.prevent="moveHandle" @click="maskclose"> |
| | | <scroll-view class="uni-scroll_box" scroll-y @touchmove.stop.prevent="moveHandle" @click.stop="moveHandle"> |
| | | <view class="uni-list-box" v-for="(item, index) in listDevice" :key="index" @click="tapQuery(item)"> |
| | | <view> |
| | | <view class="uni-list_name">åç§°ï¼{{ item.name }}</view> |
| | | <view class="uni-list_item">UUID:{{ item.address }}</view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | <view class="page"> |
| | | <view class="finishProductIn-locno-bg" /> |
| | | <u-navbar title="æ ¸ç£
è®°å½" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" |
| | | back-icon-color="#000"> |
| | | <view class="navbar-right" slot="right" @click="goPrintAll"> |
| | | å
¨é¨æå° |
| | | </view> |
| | | </u-navbar> |
| | | <view class="wrap"> |
| | | <scroll-view class="finishProductIn-locno-scroll-list" scroll-y="true" @scrolltolower="getmoreList()"> |
| | | <u-cell-group class="finishProductIn-locno-scroll-list-group" :border="false"> |
| | | <view class="content" v-for="(item, index) in list" :key="item.locNo" :index="index" |
| | | @click="selectNo(item)"> |
| | | <view class="content-header"> |
| | | <view class="content-header-title">{{ index + 1 }}</view> |
| | | </view> |
| | | <view class="content-body"> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">æ¹æ¬¡å·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.outBatchNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">产åæè¿°ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.netWeight }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> </view> |
| | | <view class="_label-name">é¶ä»¶å·ï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.partNo }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">æ¯éï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.grossWeight }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">çéï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.trayWeight }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-3"> </view> |
| | | <view class="_label-name">åéï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value5 }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-1"> </view> |
| | | <view class="_label-name">æ ¸ç£
ééï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.netWeight }} |
| | | </view> |
| | | </view> |
| | | <view class="row-list"> |
| | | <view class="_label"> |
| | | <view class="_label-icon-2"> </view> |
| | | <view class="_label-name">å车çéï¼</view> |
| | | </view> |
| | | <view class="_content"> |
| | | {{ item.value7 }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-cell-group> |
| | | <view class="loadmore" @click="getmoreList()"> |
| | | <u-loadmore :status="status" :load-text="loadText" @loadmore="getmoreList()" /> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | <u-modal v-model="maskShow" title="" v-for="(item, index) in listDevice" :key="index" |
| | | :show-confirm-button="true" @confirm="tapQuery(item)"> |
| | | <view class="packing-registration-param-view" @touchmove.stop.prevent="moveHandle" @click="maskclose"> |
| | | <scroll-view class="uni-scroll_box" scroll-y @touchmove.stop.prevent="moveHandle" |
| | | @click.stop="moveHandle"> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">åç§°ï¼</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one">{{ item.name }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">UUID:</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <text class="item-one">{{ item.address }}</text> |
| | | |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </u-modal> |
| | | </view> |
| | | </template> |
| | | <script> |
| | | import content_bg from '@/static/custom/finishProductIn/locNoBg.png' |
| | | const jcapi = uni.requireNativePlugin("JCSDK-JCApiModule"); |
| | | import content_bg from '@/static/custom/finishProductIn/locNoBg.png' |
| | | const jcapi = uni.requireNativePlugin("JCSDK-JCApiModule"); |
| | | |
| | | // äºç»´ç ç±»å |
| | | const QrCodeType = { |
| | | QrCode: 31, |
| | | PDF417: 32, |
| | | DataMatrix: 33, |
| | | AZTEC: 34 |
| | | } |
| | | // 线æ¡ç±»å |
| | | const LineType = { |
| | | Solid: 1, // å®çº¿ |
| | | Dotted: 2, // è线ï¼é»è®¤èå®1:1ç¸é´ï¼ |
| | | } |
| | | // æ¢è¡æ¹å¼ |
| | | const LineModeType = { |
| | | Justified: 1, // 宽é«åºå®ï¼å
容èªéåºï¼åå·/åé´è·/è¡é´è·ææ¯ä¾ç¼©æ¾ï¼ |
| | | AutoHeight: 2, // 宽度åºå®ï¼é«åº¦èªéåº |
| | | Fixed: 4, // 宽é«åºå®ï¼è¶
åºé¨åè£åª |
| | | Adapt: 6, // 宽é«åºå®ï¼å
容è¶
è¿æ¶é¢è®¾å®½é«èªå¨ç¼©å° |
| | | } |
| | | export default { |
| | | data() { |
| | | return { |
| | | background: { |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | keywords: '', |
| | | alllist: [], |
| | | originList: [], |
| | | query: { |
| | | current: 1, |
| | | size: 10 |
| | | }, |
| | | list: [ |
| | | { |
| | | value0: '123456789', |
| | | value1: '123456789', |
| | | value2: '123456789', |
| | | value3: '123456789', |
| | | value4: '123456789', |
| | | value5: '123456789', |
| | | value6: '123456789', |
| | | value7: '123456789' |
| | | }, |
| | | { |
| | | value0: '123456789', |
| | | value1: '123456789', |
| | | value2: '123456789', |
| | | value3: '123456789', |
| | | value4: '123456789', |
| | | value5: '123456789', |
| | | value6: '123456789', |
| | | value7: '123456789' |
| | | } |
| | | ], |
| | | count: 0, |
| | | loadStatus: 'loading', |
| | | maskShow: false, |
| | | listDevice: [], //èçè®¾å¤æ°æ® |
| | | pritList: [] |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.$u.api.finishProductIn.fetchList().then(res => { |
| | | this.alllist = res.data |
| | | this.originList = res.data |
| | | this.loadList() |
| | | }) |
| | | // åå§åSDK |
| | | jcapi.initSDK() |
| | | // çå¬é¡µç åè° |
| | | jcapi.didReadPrintCountInfo(function (r) { |
| | | console.log(r) |
| | | }) |
| | | // äºç»´ç ç±»å |
| | | const QrCodeType = { |
| | | QrCode: 31, |
| | | PDF417: 32, |
| | | DataMatrix: 33, |
| | | AZTEC: 34 |
| | | } |
| | | // 线æ¡ç±»å |
| | | const LineType = { |
| | | Solid: 1, // å®çº¿ |
| | | Dotted: 2, // è线ï¼é»è®¤èå®1:1ç¸é´ï¼ |
| | | } |
| | | // æ¢è¡æ¹å¼ |
| | | const LineModeType = { |
| | | Justified: 1, // 宽é«åºå®ï¼å
容èªéåºï¼åå·/åé´è·/è¡é´è·ææ¯ä¾ç¼©æ¾ï¼ |
| | | AutoHeight: 2, // 宽度åºå®ï¼é«åº¦èªéåº |
| | | Fixed: 4, // 宽é«åºå®ï¼è¶
åºé¨åè£åª |
| | | Adapt: 6, // 宽é«åºå®ï¼å
容è¶
è¿æ¶é¢è®¾å®½é«èªå¨ç¼©å° |
| | | } |
| | | export default { |
| | | data() { |
| | | return { |
| | | background: { |
| | | backgroundImage: `url(${content_bg})`, |
| | | backgroundAttachment: 'fixed', |
| | | backgroundSize: '100% auto', |
| | | backgroundRepeat: 'no-repeat', |
| | | }, |
| | | keywords: '', |
| | | list: [], |
| | | total: 0, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | status: 'loading', |
| | | loadText: { |
| | | loadmore: "å è½½æ´å¤...", |
| | | loading: "åªåå è½½ä¸...", |
| | | nomore: "æ²¡ææ´å¤äº", |
| | | }, |
| | | maskShow: false, |
| | | listDevice: [], //èçè®¾å¤æ°æ® |
| | | pritList: [], |
| | | printDensity: 3, // é»è®¤æå°æµåº¦ |
| | | labelType: 1, // é»è®¤æ ç¾ç±»å * |
| | | // 1ï¼é´é纸 |
| | | // 2ï¼é»æ 纸 |
| | | // 3ï¼è¿ç»çº¸ |
| | | // 4ï¼å®å纸 |
| | | // 5ï¼éæçº¸ |
| | | printMode: 2, // é»è®¤æå°æ¨¡å¼ |
| | | // 1ï¼çæ |
| | | // 2ï¼çè½¬å° |
| | | connectedDevice: null // å·²è¿æ¥çæå°æº |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | this.getlist() |
| | | // åå§åSDK |
| | | jcapi.initSDK() |
| | | // çå¬é¡µç åè° |
| | | jcapi.didReadPrintCountInfo(function(r) { |
| | | console.log(r) |
| | | }) |
| | | |
| | | // çå¬é误åè° |
| | | jcapi.didReadPrintErrorInfo(function (r) { |
| | | console.log(r) |
| | | if (r.code == 23) { |
| | | // æå°æºæå¼è¿æ¥ |
| | | _this.connectedDevice = null |
| | | } |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: JSON.stringify(r), |
| | | duration: 2 * 1000 |
| | | }) |
| | | }) |
| | | }, |
| | | methods: { |
| | | loadMore() { |
| | | if (this.loadStatus == "nomore" || this.loadStatus == "loading") { |
| | | return |
| | | } |
| | | this.loadStatus = "loading"; |
| | | setTimeout(() => { |
| | | this.query.current += 1; |
| | | this.loadList(); |
| | | }, 100); |
| | | }, |
| | | loadList() { |
| | | const data = this.originList.slice((this.query.current - 1) * this.query.size, this.query.current * this.query.size) |
| | | this.list = this.list.concat(data); |
| | | this.loadStatus = "loadmore"; |
| | | if (!data || data.length < this.query.size) { |
| | | this.loadStatus = "nomore"; |
| | | } |
| | | }, |
| | | search(value) { |
| | | this.list = []; |
| | | this.query.current = 1; |
| | | if (value) { |
| | | this.originList = this.alllist.filter(item => item.locNo.includes(value)) |
| | | } else { |
| | | this.originList = this.alllist |
| | | } |
| | | this.loadList() |
| | | }, |
| | | // æå°åä¸ªä¿¡æ¯ |
| | | selectNo(item) { |
| | | let that = this |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æ¯å¦æå°è£
ç®±åï¼', |
| | | showCancel: true, |
| | | success: function (res) { |
| | | if (res.confirm) { |
| | | that.searchDevice() |
| | | that.pritList = [item] |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // æå°å
¨é¨ä¿¡æ¯ |
| | | goPrintAll() { |
| | | let that = this |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æ¯å¦æå°è£
ç®±åï¼', |
| | | showCancel: true, |
| | | success: function (res) { |
| | | if (res.confirm) { |
| | | that.searchDevice() |
| | | that.pritList = this.list |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | moveHandle() { |
| | | // çå¬é误åè° |
| | | jcapi.didReadPrintErrorInfo((r) => { |
| | | console.log(r) |
| | | if (r.code == 23) { |
| | | // æå°æºæå¼è¿æ¥ |
| | | this.connectedDevice = null |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: 'æå°æºè¿æ¥å·²æå¼ï¼è¯·éæ°è¿æ¥', |
| | | duration: 2 * 1000 |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: JSON.stringify(r), |
| | | duration: 2 * 1000 |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | methods: { |
| | | getmoreList() { |
| | | if (this.pageSize >= this.total) { |
| | | this.status = "nomore"; |
| | | return; |
| | | } |
| | | this.status = "loading"; |
| | | setTimeout(() => { |
| | | this.pageSize += this.pageSize; |
| | | this.getlist(); |
| | | }, 1000); |
| | | }, |
| | | getlist() { |
| | | this.$u.api.workReporting |
| | | .getWorkshopOrder({ |
| | | current: this.pageNum, |
| | | size: this.pageSize |
| | | }) |
| | | .then((res) => { |
| | | this.list = res.data.records; |
| | | this.total = res.data.total; |
| | | if (this.pageSize >= this.total) { |
| | | this.status = "nomore"; |
| | | } else { |
| | | this.status = "loadmore"; |
| | | } |
| | | }); |
| | | }, |
| | | search(value) { |
| | | if (value) { |
| | | this.list = []; |
| | | this.pageSize = 10; |
| | | this.$u.api.workReporting |
| | | .getWorkshopOrder({ |
| | | current: this.pageNum, |
| | | size: this.pageSize, |
| | | moNo: value, |
| | | }) |
| | | .then((res) => { |
| | | this.list = res.data.records; |
| | | this.total = res.data.total; |
| | | if (this.pageSize >= this.total) { |
| | | this.status = "nomore"; |
| | | } else { |
| | | this.status = "loadmore"; |
| | | } |
| | | }); |
| | | } else { |
| | | this.getlist(); |
| | | } |
| | | }, |
| | | // æå°åä¸ªä¿¡æ¯ |
| | | // æ£æ¥èçè¿æ¥ç¶æ |
| | | async checkBluetoothConnection() { |
| | | if (!this.connectedDevice) return false; |
| | | |
| | | // å°è¯åéä¸ä¸ªç®åå½ä»¤æ£æ¥è¿æ¥ç¶æ |
| | | return new Promise(resolve => { |
| | | jcapi.checkPrinterStatus(this.connectedDevice.address, r => { |
| | | if (r && r.code === 0) { |
| | | resolve(true); |
| | | } else { |
| | | // è¿æ¥å·²æå¼ |
| | | this.connectedDevice = null; |
| | | resolve(false); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | }, |
| | | maskclose() { |
| | | selectNo(item) { |
| | | let that = this |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æ¯å¦æå°è£
ç®±åï¼', |
| | | showCancel: true, |
| | | success: async function(res) { |
| | | if (res.confirm) { |
| | | // æ£æ¥èçè¿æ¥ç¶æ |
| | | const isConnected = await that.checkBluetoothConnection(); |
| | | if (isConnected) { |
| | | // å·²è¿æ¥ï¼ç´æ¥æå° |
| | | that.pritList = [item] |
| | | that.pritList.forEach(async item => { |
| | | await that.printQrCode(item) |
| | | }) |
| | | } else { |
| | | // æªè¿æ¥æè¿æ¥å·²æå¼ï¼æç´¢è®¾å¤ |
| | | that.searchDevice() |
| | | that.pritList = [item] |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // æå°å
¨é¨ä¿¡æ¯ |
| | | goPrintAll() { |
| | | let that = this |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æ¯å¦æå°è£
ç®±åï¼', |
| | | showCancel: true, |
| | | success: async function(res) { |
| | | if (res.confirm) { |
| | | // æ£æ¥èçè¿æ¥ç¶æ |
| | | const isConnected = await that.checkBluetoothConnection(); |
| | | if (isConnected) { |
| | | // å·²è¿æ¥ï¼ç´æ¥æå° |
| | | that.pritList = that.list |
| | | that.pritList.forEach(async item => { |
| | | await that.printQrCode(item) |
| | | }) |
| | | } else { |
| | | // æªè¿æ¥æè¿æ¥å·²æå¼ï¼æç´¢è®¾å¤ |
| | | that.searchDevice() |
| | | that.pritList = that.list |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | moveHandle() { |
| | | |
| | | }, |
| | | //æå°äºç»´ç |
| | | async printQrCode(item) { |
| | | const params = { |
| | | rwMatlBindId: item.id |
| | | } |
| | | let res = await this.$u.api.dailyPaper.zongjianLabelInfo(params) |
| | | if (!res.data) { |
| | | this.$refs.uToast.show({ |
| | | title: 'æªæ¥è¯¢å°è¯¥æ ç¾ä¿¡æ¯ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | return |
| | | } |
| | | // åå§åç»æ¿ |
| | | jcapi.initDrawingBoard({ |
| | | width: 50, |
| | | height: 100, |
| | | rotate: 0 |
| | | }); |
| | | }, |
| | | maskclose() { |
| | | |
| | | // // ç»å¶äºç»´ç |
| | | jcapi.drawLabelQrCode({ |
| | | x: 14.5, |
| | | y: 74, |
| | | width: 20, |
| | | height: 20, |
| | | value: jsonString, |
| | | rotate: 0, |
| | | codeType: QrCodeType.QrCode, |
| | | }); |
| | | // ç»å¶æ¨ªçº¿ å®çº¿8æ¡ |
| | | let sum = 4; |
| | | for (let i = 1; i < 13; i++) { |
| | | this.getDrawLabelLine(4, sum, 46, 0.5, 0, LineType.Solid) // å®çº¿ |
| | | sum = (i * 6) + 4 |
| | | } |
| | | // äºç»´ç å¤§æ¡ |
| | | this.getDrawLabelLine(4, 97, 46, 0.5, 0, LineType.Solid) // å®çº¿9 |
| | | }, |
| | | //æå°äºç»´ç |
| | | async printQrCode(item) { |
| | | console.log('item de shuju ', item) |
| | | const params = { |
| | | rwMatlBindId: item.id |
| | | }; |
| | | try { |
| | | let res = await this.$u.api.dailyPaper.zongjianLabelInfo(params) |
| | | if (!res.data) { |
| | | this.$refs.uToast.show({ |
| | | title: 'æªæ¥è¯¢å°è¯¥æ ç¾ä¿¡æ¯ï¼', |
| | | type: 'warning ' |
| | | }) |
| | | return |
| | | } |
| | | // const res = { |
| | | // ht: 'HT20250717995352665', |
| | | // lj: '88.118.1/A0611091', |
| | | // ljms: 'éå线 裸é-TY-åå½¢-3.0', |
| | | // fh: '1083.6', |
| | | // scdt: '2025-07-14 13:46:55.0', |
| | | // scph: '2025071273-3', |
| | | // fhdw: 'æ±ä¸åéææ¯æéå
¬å¸', |
| | | // shdw: 'æå±±æ³°å¾·éé䏿éå
¬å¸', |
| | | // } |
| | | // ä»APIååºä¸æåæéæ°æ® |
| | | const { |
| | | ht, |
| | | lj, |
| | | ljms, |
| | | fh, |
| | | scdt, |
| | | scph, |
| | | fhdw, |
| | | shdw |
| | | } = res.data |
| | | // const jsonString = JSON.stringify(res.data) |
| | | |
| | | //ç»å¶ç«çº¿ |
| | | this.getDrawLabelLine(4, 4, 0.5, 97, 0, LineType.Solid) // ç«çº¿1 |
| | | this.getDrawLabelLine(20, 4, 0.5, 66, 0, LineType.Solid) // ç«çº¿2 |
| | | this.getDrawLabelLine(44.5, 4, 0.5, 97, 0, LineType.Solid) // ç«çº¿2 |
| | | // åå§åç»æ¿ |
| | | jcapi.initDrawingBoard({ |
| | | width: 70, |
| | | height: 49, |
| | | rotate: 90 |
| | | }); |
| | | |
| | | // å¡«å²æåæ é¢ |
| | | this.getDrawLabelText(5, 5, 20, 20, 'ç¼ å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 11, 20, 20, 'å·¥åå·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 17, 20, 20, 'ç å·:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 23, 20, 20, 'ç宽ï¼mmï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 29, 20, 20, 'å度ï¼mmï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 35, 20, 20, 'ééï¼KGï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 41, 20, 20, 'é¿åº¦ï¼mï¼:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 47, 20, 20, 'ç产人:', 3.6, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 53, 20, 20, 'ç产æ¶é´:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 59, 20, 20, 'åå®¶:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | this.getDrawLabelText(5, 65, 20, 20, 'éæ:', 3.4, 0, LineModeType.AutoHeight, 0, 0, 0, 1) |
| | | // ç»å¶äºç»´ç |
| | | const qrContent = |
| | | `ht:${ht}\nlj:${lj}\nljms:${ljms}\nfh:${fh}\nscdt:${scdt}\nscph:${scph}\nfhdw:${fhdw}\nshdw:${shdw}`; |
| | | jcapi.drawLabelQrCode({ |
| | | x: 43.5, |
| | | y: 2, |
| | | width: 24, |
| | | height: 24, |
| | | value: qrContent, |
| | | rotate: 0, |
| | | codeType: QrCodeType.QrCode, |
| | | }); |
| | | // getDrawLabelLine ï¼xåæ ï¼yåæ ï¼çº¿æ¡å®½åº¦ï¼çº¿æ¡é«åº¦ï¼æè½¬è§åº¦ï¼çº¿æ¡ç±»åï¼ |
| | | // ç»å¶æ¨ªçº¿ å®çº¿8æ¡ |
| | | this.getDrawLabelLine(1, 1, 67, 0.5, 0, LineType.Solid) |
| | | this.getDrawLabelLine(1, 6, 42, 0.3, 0, LineType.Solid) |
| | | this.getDrawLabelLine(1, 11, 42, 0.3, 0, LineType.Solid) |
| | | this.getDrawLabelLine(1, 16, 42, 0.3, 0, LineType.Solid) |
| | | this.getDrawLabelLine(1, 21, 42, 0.3, 0, LineType.Solid) |
| | | this.getDrawLabelLine(1, 27, 67, 0.3, 0, LineType.Solid) |
| | | this.getDrawLabelLine(1, 32, 67,0.3, 0, LineType.Solid) |
| | | this.getDrawLabelLine(1, 37, 67, 0.3, 0, LineType.Solid) |
| | | this.getDrawLabelLine(1, 42, 67, 0.3, 0, LineType.Solid) |
| | | this.getDrawLabelLine(1, 47, 67, 0.5, 0, LineType.Solid) |
| | | //ç»å¶ç«çº¿ |
| | | this.getDrawLabelLine(1, 1, 0.5, 46, 0, LineType.Solid) // ç«çº¿1 |
| | | this.getDrawLabelLine(43, 1, 0.3, 26, 0, LineType.Solid) // ç«çº¿2 |
| | | this.getDrawLabelLine(68, 1, 0.5, 46, 0, LineType.Solid) // ç«çº¿2 |
| | | // getDrawLabelText ï¼1.xåæ ï¼2.yåæ ï¼3.ææ¬æ¡å®½åº¦ï¼4.ææ¬æ¡é«åº¦ï¼5.ç»å¶æåå
容ï¼6.åä½å¤§å°ï¼é»è®¤é«åº¦4mmï¼,7.æè½¬è§åº¦,8.æ¢è¡æ¹å¼,9.â¾é´é,10.åé´é,11.æåæ°´å¹³å¸å±,12æååç´å¸å±) |
| | | // æ é¢ |
| | | this.getDrawLabelText(3, 2.5, 40, 8, 'ä¸å¤©ç§æè£
ç®±æ¸
å', 2.5, 0, LineModeType.AutoHeight, 0, 0, 1, 1,1) |
| | | // å¡«å²æåæ é¢ |
| | | this.getDrawLabelText(2, 7, 25, 8, 'ååå·:', 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 1,1) |
| | | this.getDrawLabelText(2, 12, 25, 8, 'é¶ä»¶å·:', 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 1,1) |
| | | this.getDrawLabelText(2, 17, 25, 8, 'é¶ä»¶æè¿°:', 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 1,1) |
| | | this.getDrawLabelText(2, 22.5, 25, 8, 'åè´§/è£
ç®±æ°:', 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 1,1) |
| | | this.getDrawLabelText(2, 27.5, 25, 8, 'çäº§æ¥æ:', 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 1,1) |
| | | this.getDrawLabelText(2, 32.5, 25, 8, 'ç产æ¹å·:', 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 1,1) |
| | | this.getDrawLabelText(2, 37.5, 25, 8, 'åè´§åä½:', 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 1,1) |
| | | this.getDrawLabelText(2, 42.5, 25, 8, 'æ¶è´§åä½:', 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 1,1) |
| | | // å¡«å²åæ°å¼ |
| | | this.getDrawLabelText(11, 7, 30, 8, ht, 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 0,1) |
| | | this.getDrawLabelText(11, 12, 32, 8, lj, 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 0,1) |
| | | this.getDrawLabelText(14, 17, 30, 8, ljms, 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 0,1) |
| | | this.getDrawLabelText(17, 22.5, 27, 8, fh, 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 0,1) |
| | | this.getDrawLabelText(14, 27.5, 55, 8, scdt, 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 0,1) |
| | | this.getDrawLabelText(14, 32.5, 55, 8, scph, 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 0,1) |
| | | this.getDrawLabelText(14, 37.5,55, 8, fhdw, 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 0,1) |
| | | this.getDrawLabelText(14, 42.5, 55, 8, shdw, 2.5, 0, LineModeType.AutoHeight, 0, 0, 0, 0,1) |
| | | |
| | | // // å¡«å²åæ°å¼ |
| | | this.getDrawLabelText(22, 5, 35, 12, labelNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 11, 35, 12, optaskNo, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 17, 35, 12, grade, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 23, 35, 12, sliceWidth, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 29, 35, 12, thickness, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 35, 35, 12, wweight, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 41, 35, 12, llength, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 47, 35, 12, reportName, 2, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 53, 35, 12, reportTime, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 59, 35, 12, supplierVenderName, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | this.getDrawLabelText(22, 65, 35, 12, ironLoss, 3, 0, LineModeType.AutoHeight, 0, 0, 0, 0) |
| | | // çææå°æ°æ® |
| | | let imageJsonObj = jcapi.generateLabelJson() |
| | | let imageJsonObj111 = jcapi.generatePrintPreviewImage(imageJsonObj) |
| | | console.log('é¢è§', imageJsonObj111) |
| | | // // 设置æå°ä»»å¡ |
| | | jcapi.startJob({ |
| | | totalCount: 1, |
| | | density: this.printDensity, |
| | | labelType: this.labelType, |
| | | printMode: this.printMode, |
| | | }, function(r) { |
| | | console.log('æå°', r) |
| | | if (r.code == 0) { |
| | | // æå°æ°æ® |
| | | jcapi.printData(imageJsonObj, { |
| | | "printQuantity": 1, |
| | | }, function(r) { |
| | | if (r.code == 0) { |
| | | console.log("æå°æå") |
| | | uni.showToast({ |
| | | title: 'æå°æå', |
| | | icon: 'success' |
| | | }) |
| | | } else { |
| | | console.log("æå°å¤±è´¥") |
| | | uni.showToast({ |
| | | title: 'æå°å¤±è´¥: ' + (r.msg || 'æªç¥é误'), |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | console.log("设置æå°ä»»å¡å¤±è´¥") |
| | | } |
| | | |
| | | // çææå°æ°æ® |
| | | let imageJsonObj = jcapi.generateLabelJson() |
| | | // 设置æå°ä»»å¡ |
| | | jcapi.startJob({ |
| | | totalCount: 1, |
| | | density: this.printDensity, |
| | | labelType: this.labelType, |
| | | printMode: this.printMode, |
| | | }, function (r) { |
| | | if (r.code == 0) { |
| | | // æå°æ°æ® |
| | | jcapi.printData(imageJsonObj, { |
| | | "printQuantity": 1, |
| | | }, function (r) { |
| | | if (r.code == 0) { |
| | | console.log("æå°æå") |
| | | } else { |
| | | console.log("æå°å¤±è´¥") |
| | | } |
| | | }) |
| | | } else { |
| | | console.log("设置æå°ä»»å¡å¤±è´¥") |
| | | } |
| | | }) |
| | | }, |
| | | tapQuery(item) { |
| | | this.maskShow = false |
| | | // è¿æ¥æå°æº |
| | | let _this = this; |
| | | console.log(item) |
| | | jcapi.openPrinterByDevice({ |
| | | address: item.address, |
| | | name: item.name, |
| | | deviceType: item.deviceType // 设å¤ç±»åï¼0-èçï¼1-ç½ç» |
| | | }, function (r) { |
| | | uni.showToast({ |
| | | title: (r.code == 0) ? "è¿æ¥æå" : "è¿æ¥å¤±è´¥", |
| | | duration: 2 * 1000 |
| | | }) |
| | | if (r.code == 0) { |
| | | _this.connectedDevice = item |
| | | // ç»æ ç¾è¿è¡æå° |
| | | _this.pritList.forEac(async item => { |
| | | await _this.printQrCode(item) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | //æå°ç¸å
³ |
| | | searchDevice() { |
| | | let _this = this |
| | | uni.openBluetoothAdapter({ // 确认èçæ¯å¦æå¼ |
| | | success(r) { |
| | | uni.showLoading({ |
| | | title: "æç´¢ä¸..." |
| | | }) |
| | | // æªæäºèçç¸å
³æéåæªæå¼ææºå®ä½ä¼æç´¢ä¸å°è®¾å¤ |
| | | jcapi.getBluetoothDevices(function (r) { |
| | | console.log("device:" + JSON.stringify(r)) |
| | | // æç´¢å°è®¾å¤åè° |
| | | uni.hideLoading() |
| | | _this.listDevice = r; |
| | | _this.maskShow = true |
| | | }) |
| | | }, |
| | | fail(e) { |
| | | uni.showModal({ |
| | | confirmText: "æå¼èç失败" |
| | | }) |
| | | console.log("å¼å¯èç设å¤å¤±è´¥" + e) |
| | | } |
| | | }) |
| | | }, |
| | | // ç»å¶æ¨ªçº¿ å®çº¿ |
| | | getDrawLabelLine(x, y, width, height, rotate, lineType) { |
| | | jcapi.drawLabelLine({ |
| | | x: x, |
| | | y: y, |
| | | width: width, |
| | | height: height, |
| | | rotate: rotate, |
| | | lineType: lineType |
| | | }); |
| | | }, |
| | | // å¡«å²æåæ é¢ |
| | | getDrawLabelText(x, y, width, height, value, fontSize, rotate, lineMode, lineSpace, letterSpace, textAlignHorizontal, textAlignVertical) { |
| | | jcapi.drawLabelText({ |
| | | x: x, |
| | | y: y, |
| | | width: width, |
| | | height: height, |
| | | value: value, |
| | | fontSize: fontSize, |
| | | rotate: rotate, |
| | | lineMode: lineMode, |
| | | lineSpace: lineSpace, |
| | | letterSpace: letterSpace, |
| | | textAlignHorizontal: textAlignHorizontal, |
| | | textAlignVertical: textAlignVertical |
| | | }) |
| | | }, |
| | | }) |
| | | |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(no) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | }, |
| | | tapQuery(item) { |
| | | this.maskShow = false |
| | | // è¿æ¥æå°æº |
| | | let _this = this; |
| | | console.log(item) |
| | | jcapi.openPrinterByDevice({ |
| | | address: item.address, |
| | | name: item.name, |
| | | deviceType: 0 // 设å¤ç±»åï¼0-èçï¼1-ç½ç» |
| | | }, function(r) { |
| | | uni.showToast({ |
| | | title: (r.code == 0) ? "è¿æ¥æå" : "è¿æ¥å¤±è´¥", |
| | | duration: 2 * 1000 |
| | | }) |
| | | if (r.code == 0) { |
| | | _this.connectedDevice = item |
| | | // æ·»å æå°åè¡¨ç©ºå¼æ£æ¥ |
| | | if (!_this.pritList || _this.pritList.length === 0) { |
| | | uni.showToast({ |
| | | title: '没æå¯æå°çæ°æ®', |
| | | icon: 'none' |
| | | }) |
| | | return |
| | | } |
| | | // ç»æ ç¾è¿è¡æå° |
| | | _this.pritList.forEach(async item => { |
| | | await _this.printQrCode(item) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | //æå°ç¸å
³ |
| | | searchDevice() { |
| | | let _this = this |
| | | uni.openBluetoothAdapter({ // 确认èçæ¯å¦æå¼ |
| | | success(r) { |
| | | uni.showLoading({ |
| | | title: "æç´¢ä¸..." |
| | | }) |
| | | // æªæäºèçç¸å
³æéåæªæå¼ææºå®ä½ä¼æç´¢ä¸å°è®¾å¤ |
| | | jcapi.getBluetoothDevices(function(r) { |
| | | console.log("device:" + JSON.stringify(r)) |
| | | // æç´¢å°è®¾å¤åè° |
| | | uni.hideLoading() |
| | | // 妿ä¹åæè¿æ¥ç设å¤ä½ä¸å¨æç´¢ç»æä¸ï¼è¯´æè®¾å¤å·²æ´æ¢ |
| | | if (_this.connectedDevice && !r.some(dev => dev.address === _this.connectedDevice.address)) { |
| | | _this.connectedDevice = null; |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: 'å·²è¿æ¥çèç设å¤å·²æ´æ¢ï¼è¯·éæ°éæ©', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | _this.listDevice = r; |
| | | _this.maskShow = true |
| | | }) |
| | | }, |
| | | fail(e) { |
| | | uni.showModal({ |
| | | title: 'æç¤º', |
| | | content: 'æå¼èç失败ï¼è¯·æ£æ¥èçæ¯å¦å¼å¯', |
| | | showCancel: false |
| | | }) |
| | | console.log("å¼å¯èç设å¤å¤±è´¥" + e) |
| | | } |
| | | }) |
| | | }, |
| | | // ç»å¶æ¨ªçº¿ å®çº¿ |
| | | getDrawLabelLine(x, y, width, height, rotate, lineType) { |
| | | jcapi.drawLabelLine({ |
| | | x: x, |
| | | y: y, |
| | | width: width, |
| | | height: height, |
| | | rotate: rotate, |
| | | lineType: lineType |
| | | }); |
| | | }, |
| | | // å¡«å²æåæ é¢ |
| | | getDrawLabelText(x, y, width, height, value, fontSize, rotate, lineMode, lineSpace, letterSpace, |
| | | textAlignHorizontal, textAlignVertical,bold) { |
| | | |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | jcapi.drawLabelText({ |
| | | x: x, |
| | | y: y, |
| | | width: width, |
| | | height: height, |
| | | value: value, |
| | | fontSize: fontSize, |
| | | rotate: rotate, |
| | | lineMode: lineMode, |
| | | lineSpace: lineSpace, |
| | | letterSpace: letterSpace, |
| | | textAlignHorizontal: textAlignHorizontal, |
| | | textAlignVertical: textAlignVertical, |
| | | bold:bold |
| | | }) |
| | | }, |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.setNo(no) |
| | | //å·æ°ä¸ä¸ä¸ªé¡µé¢ |
| | | refreshLastPage(no) { |
| | | // åç¥ A.vue æ´æ°æ°æ® |
| | | // è·å页颿 |
| | | let pages = getCurrentPages() |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | // è·åä¸ä¸é¡µæ |
| | | let prevPage = pages[pages.length - 2] |
| | | |
| | | // 触åä¸ä¸é¡µ upData 彿°(å¹¶æºå¸¦åæ°) |
| | | prevPage.$vm.setNo(no) |
| | | |
| | | // è¿åä¸ä¸é¡µ |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }) |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss"> |
| | | .finishProductIn-locno-bg { |
| | | background-color: #F6F9FF; |
| | | background-image: url('~@/static/custom/finishProductIn/locNoBg.png'); |
| | | // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0)); |
| | | padding: 0 20rpx; |
| | | background-attachment: fixed; |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | .finishProductIn-locno-bg { |
| | | background-color: #F6F9FF; |
| | | background-image: url('~@/static/custom/finishProductIn/locNoBg.png'); |
| | | // background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0)); |
| | | padding: 0 20rpx; |
| | | background-attachment: fixed; |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | position: fixed; |
| | | top: 0; |
| | | bottom: 0; |
| | | width: 100%; |
| | | z-index: -1; |
| | | } |
| | | |
| | | .finishProductIn-locno-search { |
| | | padding: 40rpx 30rpx 20rpx 30rpx; |
| | | } |
| | | .finishProductIn-locno-search { |
| | | padding: 40rpx 30rpx 20rpx 30rpx; |
| | | } |
| | | |
| | | .wrap .finishProductIn-locno-scroll-list { |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 242rpx); |
| | | width: 100%; |
| | | } |
| | | .wrap .finishProductIn-locno-scroll-list { |
| | | height: calc(100vh - var(--window-top) - var(--window-bottom) - 242rpx); |
| | | width: 100%; |
| | | } |
| | | |
| | | .finishProductIn-locno-scroll-list-group { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: rgba(250, 252, 255, 0.36) !important; |
| | | padding: 0rpx 30rpx; |
| | | } |
| | | .finishProductIn-locno-scroll-list-group { |
| | | ::v-deep .u-cell-item-box { |
| | | background-color: rgba(250, 252, 255, 0.36) !important; |
| | | padding: 0rpx 30rpx; |
| | | } |
| | | |
| | | .content { |
| | | font-size: 12px; |
| | | background-color: #ffffff; |
| | | box-sizing: border-box; |
| | | border-radius: 10rpx; |
| | | margin: 0rpx 0rpx 16rpx; |
| | | padding: 20rpx 8rpx; |
| | | box-shadow: none; |
| | | display: flex; |
| | | align-items: center; |
| | | .content { |
| | | font-size: 12px; |
| | | background-color: #ffffff; |
| | | box-sizing: border-box; |
| | | border-radius: 10rpx; |
| | | margin: 0rpx 0rpx 16rpx; |
| | | padding: 20rpx 8rpx; |
| | | box-shadow: none; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .content-header { |
| | | width: 40rpx; |
| | | height: 90rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | .content-header { |
| | | width: 40rpx; |
| | | height: 90rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .content-header-icon { |
| | | background-image: url("~@/static/custom/moveWareHouse/header_icon.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 28rpx; |
| | | width: 28rpx; |
| | | } |
| | | .content-header-icon { |
| | | background-image: url("~@/static/custom/moveWareHouse/header_icon.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 28rpx; |
| | | width: 28rpx; |
| | | } |
| | | |
| | | .content-header-title { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: bold; |
| | | color: #3d52f5; |
| | | } |
| | | } |
| | | .content-header-title { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: bold; |
| | | color: #3d52f5; |
| | | } |
| | | } |
| | | |
| | | .content-body { |
| | | flex: 1; |
| | | background: #f5f9ff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | .content-body { |
| | | flex: 1; |
| | | background: #f5f9ff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | |
| | | .row-list { |
| | | height: 60rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | padding: 0px; |
| | | align-items: center; |
| | | } |
| | | .row-list { |
| | | height: 60rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | padding: 0px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .row-list ._label { |
| | | display: flex; |
| | | flex: 0.8; |
| | | color: #909399; |
| | | align-items: center; |
| | | .row-list ._label { |
| | | display: flex; |
| | | flex: 0.8; |
| | | color: #909399; |
| | | align-items: center; |
| | | |
| | | ._label-icon-1 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-1.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | ._label-icon-1 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-1.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | |
| | | ._label-icon-2 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-2.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | ._label-icon-2 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-2.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | |
| | | ._label-icon-3 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-3.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | ._label-icon-3 { |
| | | background-image: url("~@/static/custom/moveWareHouse/label-icon-3.png"); |
| | | background-size: 100% auto; |
| | | background-repeat: no-repeat; |
| | | height: 26rpx; |
| | | width: 26rpx; |
| | | } |
| | | |
| | | ._label-name { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 500; |
| | | color: #666666; |
| | | } |
| | | } |
| | | ._label-name { |
| | | margin-left: 11rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 500; |
| | | color: #666666; |
| | | } |
| | | } |
| | | |
| | | .row-list ._content { |
| | | flex: 1.5; |
| | | text-align: right; |
| | | color: #909399; |
| | | font-size: 24rpx; |
| | | } |
| | | .row-list ._content { |
| | | flex: 1.5; |
| | | text-align: right; |
| | | color: #909399; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | .row-list .s1 { |
| | | color: #d35651; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .row-list .s1 { |
| | | color: #d35651; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .navbar-right { |
| | | font-weight: 500; |
| | | font-size: 13px; |
| | | color: #0b0b0b; |
| | | line-height: 36rpx; |
| | | margin-right: 32rpx; |
| | | } |
| | | </style> |
| | | .navbar-right { |
| | | font-weight: 500; |
| | | font-size: 13px; |
| | | color: #0b0b0b; |
| | | line-height: 36rpx; |
| | | margin-right: 32rpx; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <u-modal |
| | | v-model="show" |
| | | ref="uModal" |
| | | title="" |
| | | :show-cancel-button="true" |
| | | @confirm="confirm" |
| | | @cancel="cancel" |
| | | :async-close="true" |
| | | > |
| | | <view class="packing-registration-param"> |
| | | <scroll-view scroll-y="true" style="height: 100%"> |
| | | <view class="packing-registration-param-view"> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">æ¹æ¬¡å·</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="form.overallLength" |
| | | disabled |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">产åæè¿°</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="form.proposedLocation" |
| | | disabled |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">é¶ä»¶ä½</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="form.reelNumber" |
| | | disabled |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">æ¯é</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="form.reelWeight" |
| | | disabled |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">çé</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="form.grossWeight" |
| | | disabled |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">åé</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input |
| | | class="item-one item-two" |
| | | v-model="form.netWeight" |
| | | disabled |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">æ ¸ç£
éé</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input class="item-one item-two" v-model="form.name" /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">å车éé</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input class="item-one item-two" v-model="form.outerDiameter" /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">é¿åº¦</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input class="item-one item-two" v-model="form.voltage" /> |
| | | </view> |
| | | </view> |
| | | <view class="packing-registration-param-item param-extra"> |
| | | <view class="packing-registration-param-item-left"> |
| | | <text class="item-one">çå·</text> |
| | | </view> |
| | | <view class="packing-registration-param-item-right"> |
| | | <u-input class="item-one item-two" v-model="form.speed" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </u-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | operationTaskList: { |
| | | type: Object, |
| | | required: true, |
| | | default: () => ({}), |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | show: false, |
| | | form: {}, |
| | | }; |
| | | }, |
| | | methods: { |
| | | confirm() { |
| | | if (!this.form.outerDiameter) { |
| | | this.$u.toast("请è¾å
¥æ ¸ç£
éé"); |
| | | this.$refs.uModal.clearLoading(); // æ¸
é¤å è½½ç¶æ |
| | | return; |
| | | } |
| | | if (!this.form.voltage) { |
| | | this.$u.toast("请è¾å
¥å车éé"); |
| | | this.$refs.uModal.clearLoading(); // æ¸
é¤å è½½ç¶æ |
| | | return; |
| | | } |
| | | // PDA æ«ç æ ¸ç£
è§å: |
| | | // (1).éæ |
| | | // æ£ç£
å·®:0-3kg å¯ç´æ¥æäº¤ |
| | | // 4-10kg ç®éä¸å |
| | | // å¦æä¸º 4kg åéå 2kgãæ¯éå 2kg |
| | | // å¦æä¸º 5kg åéå 3kgãæ¯éå 4kg |
| | | // å¦æä¸º 6kg åéå 4kgãæ¯éå 4kg |
| | | // 以æ¤ç±»æ¨ |
| | | // æ·»å å¼¹çªæç¤º:æ´æ¹åæ ¼è¯æ¯é为..(æ¹åçå¼)ãåé为..(æ¹åçåé) |
| | | // è¶
è¿ 10kgæç¤ºçäº§æ ¸æ¥(ä¸è½æäº¤) |
| | | // è´ç£
å·®(è¦å è´å·):åéä¸å |
| | | // -10kg 以å
|
| | | // æ ¸ç£
éé-2(æ°çæ¯é)ç®é(æ°çæ¯é-åé)è¶
è¿ 10kgæç¤ºçäº§æ ¸æ¥(ä¸è½æäº¤) |
| | | // (2).å¯¼ä½ |
| | | // æ£ç£
å·®:0-3kgå¯ç´æ¥æäº¤ |
| | | // è¶
è¿ 3kgå è´ç£
å·®æç¤ºçäº§æ ¸æ¥(ä¸è½æäº¤) |
| | | // (3).导ä½2.6 |
| | | // 士0.5kg é½å¯ç´æ¥æäº¤ |
| | | // è¶
è¿0.5 æç¤ºçäº§æ ¸æ¥ |
| | | //ç£
差计ç®ï¼æ ¸æ¦-å车ç-æ¯é |
| | | Number(this.form.h); |
| | | const magnetic = |
| | | Number(this.form.h) - Number(this.form.children) - Number(this.form.m); |
| | | uni.showModal({ |
| | | title: "æç¤º", |
| | | content: "ç£
差为ï¼" + magnetic, |
| | | showCancel: false, |
| | | success: function () { |
| | | switch (this.operationTaskList.productType) { |
| | | case "éæ": |
| | | if (magnetic > 0 && magnetic < 3) { |
| | | this.verifySubmission(this.form); |
| | | } |
| | | if (magnetic == 4) { |
| | | this.form.grossWeight = Number(this.form.grossWeight) + 2; |
| | | this.form.netWeight = Number(this.form.netWeight) + 2; |
| | | this.$u.toast( |
| | | "æ´æ¹åæ ¼è¯æ¯é为ï¼" + |
| | | this.form.grossWeight + |
| | | "åé为ï¼" + |
| | | this.form.netWeight |
| | | ); |
| | | this.verifySubmission(this.form); |
| | | } |
| | | if (magnetic == 5) { |
| | | this.form.grossWeight = Number(this.form.grossWeight) + 3; |
| | | this.form.netWeight = Number(this.form.netWeight) + 3; |
| | | this.$u.toast( |
| | | "æ´æ¹åæ ¼è¯æ¯é为ï¼" + |
| | | this.form.grossWeight + |
| | | "åé为ï¼" + |
| | | this.form.netWeight |
| | | ); |
| | | this.verifySubmission(this.form); |
| | | } |
| | | if (magnetic == 6) { |
| | | this.form.grossWeight = Number(this.form.grossWeight) + 4; |
| | | this.form.netWeight = Number(this.form.netWeight) + 4; |
| | | this.$u.toast( |
| | | "æ´æ¹åæ ¼è¯æ¯é为ï¼" + |
| | | this.form.grossWeight + |
| | | "åé为ï¼" + |
| | | this.form.netWeight |
| | | ); |
| | | this.verifySubmission(this.form); |
| | | } |
| | | if (magnetic == 7) { |
| | | this.form.grossWeight = Number(this.form.grossWeight) + 5; |
| | | this.form.netWeight = Number(this.form.netWeight) + 5; |
| | | this.$u.toast( |
| | | "æ´æ¹åæ ¼è¯æ¯é为ï¼" + |
| | | this.form.grossWeight + |
| | | "åé为ï¼" + |
| | | this.form.netWeight |
| | | ); |
| | | this.verifySubmission(this.form); |
| | | } |
| | | if (magnetic == 8) { |
| | | this.form.grossWeight = Number(this.form.grossWeight) + 6; |
| | | this.form.netWeight = Number(this.form.netWeight) + 6; |
| | | this.$u.toast( |
| | | "æ´æ¹åæ ¼è¯æ¯é为ï¼" + |
| | | this.form.grossWeight + |
| | | "åé为ï¼" + |
| | | this.form.netWeight |
| | | ); |
| | | this.verifySubmission(this.form); |
| | | } |
| | | if (magnetic == 9) { |
| | | this.form.grossWeight = Number(this.form.grossWeight) + 7; |
| | | this.form.netWeight = Number(this.form.netWeight) + 7; |
| | | this.$u.toast( |
| | | "æ´æ¹åæ ¼è¯æ¯é为ï¼" + |
| | | this.form.grossWeight + |
| | | "åé为ï¼" + |
| | | this.form.netWeight |
| | | ); |
| | | this.verifySubmission(this.form); |
| | | } |
| | | if (magnetic == 10) { |
| | | this.form.grossWeight = Number(this.form.grossWeight) + 8; |
| | | this.form.netWeight = Number(this.form.netWeight) + 8; |
| | | this.$u.toast( |
| | | "æ´æ¹åæ ¼è¯æ¯é为ï¼" + |
| | | this.form.grossWeight + |
| | | "åé为ï¼" + |
| | | this.form.netWeight |
| | | ); |
| | | this.verifySubmission(this.form); |
| | | } |
| | | if (magnetic > 10) { |
| | | this.$u.toast("çäº§æ ¸æ¥"); |
| | | } |
| | | break; |
| | | // case "导ä½": |
| | | // if (magnetic > 0 && magnetic < 3) { |
| | | // this.verifySubmission(this.form); |
| | | // } else { |
| | | // this.$u.toast("çäº§æ ¸æ¥"); |
| | | // } |
| | | // break; |
| | | // case "导ä½2.6": |
| | | // if (magnetic > -0.5 && magnetic < 0.5) { |
| | | // this.verifySubmission(this.form); |
| | | // } else { |
| | | // this.$u.toast("çäº§æ ¸æ¥"); |
| | | // } |
| | | // break; |
| | | } |
| | | }, |
| | | }); |
| | | }, |
| | | // æ ¡éªåæäº¤ |
| | | verifySubmission(Obj) { |
| | | this.$emit("update", Obj); |
| | | }, |
| | | cancel() { |
| | | this.show = false; |
| | | this.form = {}; |
| | | }, |
| | | open(val) { |
| | | this.show = true; |
| | | this.form = val; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep .u-model__title { |
| | | padding-top: 0 !important; |
| | | } |
| | | |
| | | ::v-deep .u-input__input { |
| | | text-align: right !important; |
| | | } |
| | | |
| | | .packing-registration-param { |
| | | padding: 40rpx 30rpx 10rpx 30rpx; |
| | | height: 350px; |
| | | overflow: hidden; |
| | | |
| | | .packing-registration-param-title { |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .title-label { |
| | | margin-left: 14rpx; |
| | | font-size: 34rpx; |
| | | font-weight: bold; |
| | | color: #283e65; |
| | | } |
| | | } |
| | | |
| | | .packing-registration-param-view { |
| | | height: 177rpx; |
| | | background-color: #fff; |
| | | border-radius: 10rpx; |
| | | padding: 0rpx 23rpx; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .packing-registration-param-item { |
| | | height: 90rpx; |
| | | border: 1px solid #adc8e4; |
| | | line-height: 90rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | border: none; |
| | | |
| | | .packing-registration-param-item-left { |
| | | .item-one { |
| | | font-size: 30rpx; |
| | | color: #666666; |
| | | } |
| | | } |
| | | |
| | | .packing-registration-param-item-right { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .item-one { |
| | | font-size: 15rpx; |
| | | color: #060505; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | .item-two { |
| | | font-size: 15rpx; |
| | | color: #a6b4cc; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | .item-three { |
| | | font-size: 30rpx; |
| | | color: #214ded; |
| | | margin-right: 6rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .param-extra { |
| | | border-bottom: 1px solid #ededed; |
| | | } |
| | | } |
| | | } |
| | | </style> |