| | |
| | | v-model="Initiallife" /> |
| | | </uni-forms-item> |
| | | |
| | | <!-- <uni-forms-item> |
| | | <checkbox checked="check">æ¯å¦æ»¡ç</checkbox> |
| | | </uni-forms-item> --> |
| | | <uni-forms-item> |
| | | <view style="display: flex;justify-content: space-around;margin-top: 2%;"> |
| | | <button @click="reset" type="default" size="default" |
| | | style="width: 160rpx;border: 1rpx solid #007aff;color: #007aff;">éç½®</button> |
| | | <button @click="submit" type="primary" size="default" style="width: 160rpx;">ç»ç</button> |
| | | <button @click="submit" type="primary" size="default" style="width: 160rpx;" |
| | | :disabled="isSubmitting" :loading="isSubmitting"> |
| | | {{ isSubmitting ? 'æäº¤ä¸...' : 'ç»ç' }} |
| | | </button> |
| | | </view> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | <uni-list> |
| | | <!-- <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | | <view class="uni-content"> |
| | | <view class="uni-title-sub uni-ellipsis-2">ç©æç¼ç ï¼{{item.matCode}}</view> |
| | | <view class="uni-title-sub uni-ellipsis-2">æ°éï¼{{item.matQuantity}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </uni-list-item> --> |
| | | <uni-list-item direction="column" v-for="(item,index) in matInfos" :key="index"> |
| | | <template v-slot:body> |
| | | <view class="uni-list-box"> |
| | |
| | | <view class="uni-title-sub uni-ellipsis-2">éè´åå·ï¼{{item.purchaseOrderNo}}</view> |
| | | <view class="uni-note">ç©æç¼ç ï¼{{item.materielCode}}</view> |
| | | <view class="uni-note">æ¹æ¬¡å·ï¼{{item.lotNo}}</view> |
| | | <view class="uni-note">æ°éï¼{{item.quantity}}</view> |
| | | <view class="uni-note" style="display: flex; align-items: center; gap: 10rpx;"> |
| | | æ°éï¼ |
| | | <uni-easyinput |
| | | type="number" |
| | | min="1" |
| | | style="width: 150rpx; display: inline-block;" |
| | | v-model="item.quantity" |
| | | @input="handleQuantityChange(item)" |
| | | /> |
| | | </view> |
| | | <view class="uni-note">çäº§æ¥æï¼{{item.productionDate}}</view> |
| | | <view class="uni-note">æææï¼{{item.effectiveDate}}</view> |
| | | <view class="uni-note">交货åå·ï¼{{item.deliveryNote}}</view> |
| | |
| | | placeholder="è¯·æ«æå°åæ¡ç " ref='midInput' :focus="addressFocus" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">å
¥åºç¡®è®¤</button> |
| | | <button @click="inbound" type="primary" size="default" style="margin-top: 2%;" |
| | | :disabled="isInbounding" :loading="isInbounding"> |
| | | {{ isInbounding ? 'æäº¤ä¸...' : 'å
¥åºç¡®è®¤' }} |
| | | </button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | </view> |
| | |
| | | <view style="font-size: 18px;">åæ®å·ï¼{{orderNo}}</view> |
| | | <view style="font-size: 18px;">ç©æç¼ç ï¼{{item.materielCode}}</view> |
| | | <view>ç©æåç§°ï¼{{item.materielName}}</view> |
| | | <!-- <view>ç©æè§æ ¼ï¼{{item.materielSpec}}</view> --> |
| | | <!-- <view style="font-size: 18px;">ç©æåç§°ï¼{{item.matName}}</view> --> |
| | | <view style="font-size: 18px;">æ°éï¼{{item.orderQuantity}}</view> |
| | | <view style="font-size: 18px;">ç»çæ°éï¼{{item.receiptQuantity}}</view> |
| | | </view> |
| | |
| | | <button @click="resetInPk" type="default" size="default" |
| | | style="width: 160rpx;border: 1rpx solid #007aff;color: #007aff;">éç½®</button> |
| | | <button @click="pksubmit" type="primary" size="default" |
| | | style="margin-top: 2%;">å
¥å¹³åº</button> |
| | | style="margin-top: 2%;" :disabled="isPkSubmitting" :loading="isPkSubmitting"> |
| | | {{ isPkSubmitting ? 'æäº¤ä¸...' : 'å
¥å¹³åº' }} |
| | | </button> |
| | | </view> |
| | | </uni-forms-item> |
| | | |
| | |
| | | <view class="uni-title-sub uni-ellipsis-2">éè´åå·ï¼{{item.purchaseOrderNo}}</view> |
| | | <view class="uni-note">ç©æç¼ç ï¼{{item.materielCode}}</view> |
| | | <view class="uni-note">æ¹æ¬¡å·ï¼{{item.lotNo}}</view> |
| | | <view class="uni-note">æ°éï¼{{item.quantity}}</view> |
| | | <view class="uni-note" style="display: flex; align-items: center; gap: 10rpx;"> |
| | | æ°éï¼ |
| | | <uni-easyinput |
| | | type="number" |
| | | min="1" |
| | | style="width: 150rpx; display: inline-block;" |
| | | v-model="item.quantity" |
| | | @input="handlePkQuantityChange(item)" |
| | | /> |
| | | </view> |
| | | <view class="uni-note">çäº§æ¥æï¼{{item.productionDate}}</view> |
| | | <view class="uni-note">æææï¼{{item.effectiveDate}}</view> |
| | | <view class="uni-note">交货åå·ï¼{{item.deliveryNote}}</view> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | items: ['ç»ç', 'å
¥åº', 'åæ®ä¿¡æ¯'], //, 'è§£ç' |
| | | items: ['ç»ç', 'å
¥åº', 'åæ®ä¿¡æ¯'], |
| | | current: 0, |
| | | matTotal: [], |
| | | matInfos: [], |
| | |
| | | Testcheck: false, |
| | | pkmaterSn: "", |
| | | pkmatInfos: [], |
| | | addressdisabled: false |
| | | addressdisabled: false, |
| | | // æ ¸å¿éï¼é²æ¢éå¤æäº¤ |
| | | isSubmitting: false, |
| | | isInbounding: false, |
| | | isPkSubmitting: false, |
| | | // 请æ±å¯ä¸æ è¯ï¼ç¨äºåæ¶éå¤è¯·æ± |
| | | submitRequest: null |
| | | } |
| | | }, |
| | | onShow() {}, |
| | |
| | | this.getData(); |
| | | }, |
| | | methods: { |
| | | // voiceSpeech(src) { |
| | | // innerAudioContext.src = src; // '../../static/success.mp3'; |
| | | // innerAudioContext.play(); |
| | | // }, |
| | | // æ°éç¼è¾æ ¡éª |
| | | handleQuantityChange(item) { |
| | | item.quantity = item.quantity ? Math.max(1, parseInt(item.quantity)) : 1; |
| | | }, |
| | | handlePkQuantityChange(item) { |
| | | item.quantity = item.quantity ? Math.max(1, parseInt(item.quantity)) : 1; |
| | | }, |
| | | |
| | | updateFocus() { |
| | | debugger |
| | | this.$nextTick(() => { |
| | | this.materSn = ''; |
| | | if (!this.focus) { |
| | |
| | | }); |
| | | }, |
| | | barcodeFocus() { |
| | | debugger |
| | | this.barcode = ''; |
| | | if (this.focus) { |
| | | this.focus = false; |
| | |
| | | barcodeInput() { |
| | | this.$nextTick(function(x) { |
| | | if (this.barcode.length > 0) { |
| | | // if (this.barcode.substring(0, 1) == 'A' || this.barcode.substring(0, 2) == 'TP') { |
| | | this.focus = true; |
| | | // } else { |
| | | // this.$refs.uToast.show({ |
| | | // title: "æ«ç é误,è¯·æ«ææçç ", |
| | | // type: "error" |
| | | // }) |
| | | // } |
| | | } |
| | | }) |
| | | }, |
| | | // ç»ç页å
ç®±ç è§£æ |
| | | snInput() { |
| | | this.$nextTick(() => { |
| | | if (this.materSn != "") { |
| | | if (!this.materSn) return; |
| | | setTimeout(() => { |
| | | this.focus = false; |
| | | var matSn = this.materSn; |
| | | let matSn = this.materSn.trim(); |
| | | if (this.warehouseId == 11) { |
| | | matSn = matSn.replace(/,SC.*/, ''); |
| | | } |
| | | //æ¥è¯¢matSnæ¯å¦åå¨å符 |
| | | if(matSn.indexOf("PO")>0){ |
| | | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { |
| | | this.Testcheck = false; |
| | | if (res.status) { |
| | | this.sns.push(res.data.serialNumber); |
| | | |
| | | this.matInfos.push(res.data); |
| | | if (res.message) { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | return; |
| | | } |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/success.mp3'); |
| | | // }, 100); |
| | | } else { |
| | | const requiredFields = ['M:', 'BS:', 'DM:', 'DE:', 'Q:', 'PO:', 'DN:']; |
| | | const hasAllFields = requiredFields.every(field => matSn.includes(field)); |
| | | if (!hasAllFields) { |
| | | this.$refs.uToast.show({ |
| | | title: "å
ç®±ç ä¸å®æ´ï¼è¯·éæ°æ«æ", |
| | | type: "error" |
| | | }); |
| | | this.materSn = ""; |
| | | return; |
| | | } |
| | | if (matSn.indexOf("PO") <= 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "å
ç®±ç æ ¼å¼éè¯¯ï¼æ POæ è¯ï¼", |
| | | type: "error" |
| | | }); |
| | | this.materSn = ""; |
| | | return; |
| | | } |
| | | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { |
| | | this.Testcheck = false; |
| | | if (res.status) { |
| | | this.sns.push(res.data.serialNumber); |
| | | this.matInfos.push(res.data); |
| | | if (res.message) { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | type: "warning" |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | setTimeout(() => { |
| | | this.materSn = ""; |
| | | }, 100); |
| | | } |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }); |
| | | } |
| | | }); |
| | | this.materSn = ""; |
| | | }, 1000); |
| | | }) |
| | | }, |
| | | // å
¥å¹³åºé¡µå
ç®±ç è§£æ |
| | | pksnInput() { |
| | | this.$nextTick(() => { |
| | | if (this.pkmaterSn != "") { |
| | | |
| | | var matSn = this.pkmaterSn; |
| | | |
| | | if(matSn.indexOf("PO")>0){ |
| | | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { |
| | | if (res.status) { |
| | | this.pksns.push(res.data.serialNumber); |
| | | this.pkmatInfos.push(res.data); |
| | | if (!res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | return; |
| | | } |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/success.mp3'); |
| | | // }, 100); |
| | | return; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | // setTimeout(() => { |
| | | // this.voiceSpeech('../../static/fail.mp3'); |
| | | // }, 100); |
| | | } |
| | | }) |
| | | } |
| | | setTimeout(() => { |
| | | if (!this.pkmaterSn) return; |
| | | setTimeout(() => { |
| | | let matSn = this.pkmaterSn.trim(); |
| | | const requiredFields = ['M:', 'BS:', 'DM:', 'DE:', 'Q:', 'PO:', 'DN:']; |
| | | const hasAllFields = requiredFields.every(field => matSn.includes(field)); |
| | | if (!hasAllFields) { |
| | | this.$refs.uToast.show({ |
| | | title: "å
ç®±ç ä¸å®æ´ï¼è¯·éæ°æ«æ", |
| | | type: "error" |
| | | }); |
| | | this.pkmaterSn = ""; |
| | | }, 100); |
| | | } |
| | | return; |
| | | } |
| | | if (matSn.indexOf("PO") <= 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "å
ç®±ç æ ¼å¼éè¯¯ï¼æ POæ è¯ï¼", |
| | | type: "error" |
| | | }); |
| | | this.pkmaterSn = ""; |
| | | return; |
| | | } |
| | | this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => { |
| | | if (res.status) { |
| | | this.pksns.push(res.data.serialNumber); |
| | | this.pkmatInfos.push(res.data); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }); |
| | | } |
| | | }); |
| | | this.pkmaterSn = ""; |
| | | }, 100); |
| | | }) |
| | | }, |
| | | // å
¥åºç¡®è®¤ï¼å éï¼ |
| | | inbound() { |
| | | if (this.isInbounding) { |
| | | this.$refs.uToast.show({title: "æ£å¨æäº¤ä¸ï¼è¯·å¿é夿ä½", type: "warning"}); |
| | | return; |
| | | } |
| | | if (this.inboundBarcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçæ¡ç ", |
| | | type: "error" |
| | | }) |
| | | this.$refs.uToast.show({title: "è¯·æ«ææçæ¡ç ", type: "error"}); |
| | | return; |
| | | } |
| | | if (this.address == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå°åæ¡ç ", |
| | | type: "error" |
| | | }) |
| | | this.$refs.uToast.show({title: "è¯·æ«æå°åæ¡ç ", type: "error"}); |
| | | return; |
| | | } |
| | | this.isInbounding = true; |
| | | var postData = { |
| | | MainData: { |
| | | "barcode": this.inboundBarcode, |
| | |
| | | if (this.warehouseId != 5) this.address = ""; |
| | | setTimeout(() => { |
| | | this.addressFocus = false; |
| | | this.$refs.uToast.show({ |
| | | title: "æå", |
| | | type: "success" |
| | | }) |
| | | this.$refs.uToast.show({title: "æå", type: "success"}); |
| | | }, 200); |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | this.$refs.uToast.show({title: res.message, type: "error"}); |
| | | } |
| | | }).catch(err => { |
| | | this.$refs.uToast.show({ |
| | | title: err.message, |
| | | type: "error" |
| | | }) |
| | | this.$refs.uToast.show({title: err.message, type: "error"}); |
| | | }).finally(() => { |
| | | this.isInbounding = false; |
| | | }) |
| | | }, |
| | | inputChangebarcode() { |
| | |
| | | this.matInfos = []; |
| | | this.sns = []; |
| | | this.materSn = ""; |
| | | if (this.warehouseId = !6) { |
| | | if (this.warehouseId != 6) { |
| | | this.Initiallife = 0; |
| | | } |
| | | }, |
| | |
| | | this.pkmatInfos = []; |
| | | this.pksns = []; |
| | | }, |
| | | // å
¥å¹³åºï¼å éï¼ |
| | | pksubmit() { |
| | | if (this.pkmatInfos.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå
ç®±æ ç¾", |
| | | type: 'error' |
| | | }) |
| | | if (this.isPkSubmitting) { |
| | | this.$refs.uToast.show({title: "æ£å¨æäº¤ä¸ï¼è¯·å¿é夿ä½", type: "warning"}); |
| | | return; |
| | | } |
| | | this.$u.post('/api/InboundOrder/InPinKu?warehouseId=' + this.warehouseId + "&orderNo=" + this.orderNo, this |
| | | .pksns).then(res => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "å
¥åºæå", |
| | | type: "success" |
| | | }) |
| | | this.pkfocus = false; |
| | | this.pkmatInfos = []; |
| | | this.pksns = []; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | submit() { |
| | | if (this.barcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçæ¡ç ", |
| | | type: 'error' |
| | | if (this.pkmatInfos.length == 0) { |
| | | this.$refs.uToast.show({title: "è¯·æ«æå
ç®±æ ç¾", type: 'error'}); |
| | | return; |
| | | } |
| | | this.isPkSubmitting = true; |
| | | const submitData = this.pkmatInfos.map(item => ({ |
| | | serialNumber: item.serialNumber, |
| | | quantity: item.quantity |
| | | })); |
| | | this.$u.post('/api/InboundOrder/InPinKu?warehouseId=' + this.warehouseId + "&orderNo=" + this.orderNo, submitData) |
| | | .then(res => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({title: "å
¥åºæå", type: "success"}); |
| | | this.pkfocus = false; |
| | | this.pkmatInfos = []; |
| | | this.pksns = []; |
| | | } else { |
| | | this.$refs.uToast.show({title: res.message, type: "error"}); |
| | | } |
| | | }).finally(() => { |
| | | this.isPkSubmitting = false; |
| | | }) |
| | | }, |
| | | |
| | | // æ ¸å¿ä¿®å¤ï¼ç»çæäº¤ï¼å½»åºæç»éå¤è°ç¨ï¼ |
| | | submit() { |
| | | // 1. 第ä¸å±éï¼ç¶æéæ¦æª |
| | | if (this.isSubmitting) { |
| | | this.$refs.uToast.show({title: "æ£å¨æäº¤ä¸ï¼è¯·å¿é夿ä½", type: "warning"}); |
| | | return; |
| | | } |
| | | |
| | | // 2. è¡¨åæ ¡éª |
| | | if (this.barcode == "") { |
| | | this.$refs.uToast.show({title: "è¯·æ«ææçæ¡ç ", type: 'error'}); |
| | | return; |
| | | } |
| | | if (this.matInfos.length == 0) { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå
ç®±æ ç¾", |
| | | type: 'error' |
| | | }) |
| | | this.$refs.uToast.show({title: "è¯·æ«æå
ç®±æ ç¾", type: 'error'}); |
| | | return; |
| | | } |
| | | if (this.Test) { |
| | | if (!this.Testcheck) { |
| | | this.Testcheck = true; |
| | | if (this.warehouseId == 2) { |
| | | this.$refs.uToast.show({ |
| | | title: "请确认æ°é", |
| | | type: 'error' |
| | | }) |
| | | } else if (this.warehouseId == 6) { |
| | | this.$refs.uToast.show({ |
| | | title: "请确认åå§å¯¿å½", |
| | | type: 'error' |
| | | }) |
| | | } |
| | | return; |
| | | } |
| | | if (this.Test && !this.Testcheck) { |
| | | this.Testcheck = true; |
| | | this.$refs.uToast.show({ |
| | | title: this.warehouseId == 2 ? "请确认æ°é" : "请确认åå§å¯¿å½", |
| | | type: 'error' |
| | | }); |
| | | return; |
| | | } |
| | | if (this.warehouseId == 2) { //油墨ä»åºåºID |
| | | this.sn = this.sns[0]; |
| | | |
| | | // 3. 强å¶åæ¶æªå®æç请æ±ï¼å
³é®ï¼ï¼ |
| | | if (this.submitRequest) { |
| | | this.submitRequest.abort(); // åæ¶ä¸ä¸æ¬¡æªå®æçè¯·æ± |
| | | } |
| | | |
| | | // 4. ç«å³ä¸é |
| | | this.isSubmitting = true; |
| | | uni.showLoading({title: 'æäº¤ä¸...', mask: true}); |
| | | |
| | | // 5. æé è¯·æ±æ°æ® |
| | | let submitSns = this.matInfos.map(item => ({ |
| | | serialNumber: item.serialNumber, |
| | | quantity: item.quantity |
| | | })); |
| | | if (this.warehouseId == 2) { |
| | | const firstItem = submitSns[0]; |
| | | for (var i = 0; i < this.Initiallife - 1; i++) { |
| | | this.sns.push(this.sn); |
| | | submitSns.push({...firstItem}); |
| | | } |
| | | } |
| | | this.$u.post('/api/InboundOrder/MaterielGroup', { |
| | | MainData: { |
| | | "palletCode": this.barcode, |
| | | "orderNo": this.orderNo, |
| | | "initiallife": this.Initiallife, |
| | | // "isFull": this.check |
| | | "warehouseId": this.warehouseId |
| | | |
| | | // 6. 使ç¨åçuni.requestï¼æ¯æåæ¶ï¼ï¼æ¿ä»£$u.post |
| | | const requestData = { |
| | | url: '/api/InboundOrder/MaterielGroup', |
| | | method: 'POST', |
| | | data: { |
| | | MainData: { |
| | | "palletCode": this.barcode, |
| | | "orderNo": this.orderNo, |
| | | "initiallife": this.Initiallife, |
| | | "warehouseId": this.warehouseId |
| | | }, |
| | | DelKeys: submitSns |
| | | }, |
| | | DelKeys: this.sns |
| | | }).then(res => { |
| | | this.Testcheck = false; |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "ç»çæå", |
| | | type: "success" |
| | | }) |
| | | this.focus = false; |
| | | this.barcode = ""; |
| | | this.matInfos = []; |
| | | this.sns = []; |
| | | this.matTotal = []; |
| | | if (this.warehouseId != 6) { //æµè¯æ¶ä»åºåºID |
| | | this.Initiallife = ""; |
| | | success: (res) => { |
| | | // éé
æ¥å£è¿åæ ¼å¼ï¼æ ¹æ®ä½ çå®é
è¿åè°æ´ï¼ |
| | | const result = res.data; |
| | | this.Testcheck = false; |
| | | if (result.status) { |
| | | this.$refs.uToast.show({title: "ç»çæå", type: "success"}); |
| | | this.focus = false; |
| | | this.barcode = ""; |
| | | this.matInfos = []; |
| | | this.sns = []; |
| | | this.matTotal = []; |
| | | if (this.warehouseId != 6) { |
| | | this.Initiallife = ""; |
| | | } |
| | | } else { |
| | | this.$refs.uToast.show({title: result.message, type: "error"}); |
| | | } |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | }, |
| | | fail: (err) => { |
| | | // æé¤ä¸»å¨åæ¶ç请æ±ï¼é¿å
误æç¤ºï¼ |
| | | if (err.errMsg !== 'request:fail abort') { |
| | | this.$refs.uToast.show({title: err.message || "æäº¤å¤±è´¥", type: "error"}); |
| | | } |
| | | }, |
| | | complete: () => { |
| | | // 7. è§£é + æ¸
ç©ºè¯·æ±æ è¯ |
| | | this.isSubmitting = false; |
| | | this.submitRequest = null; |
| | | uni.hideLoading(); |
| | | } |
| | | }) |
| | | }; |
| | | |
| | | // 8. ä¿åè¯·æ±æ è¯ï¼ç¨äºåæ¶éå¤è¯·æ± |
| | | this.submitRequest = uni.request(requestData); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | <style lang="scss"> |
| | | @import '@/common/uni-ui.scss'; |
| | | |
| | | .content { |
| | | display: flex; |
| | | height: 150px; |
| | | } |
| | | |
| | | .content-text { |
| | | font-size: 14px; |
| | | color: #666; |
| | | } |
| | | |
| | | .itemstyle { |
| | | margin-top: 30px; |
| | | margin-left: 5%; |
| | | } |
| | | |
| | | .headerstyle { |
| | | width: 90%; |
| | | } |
| | | .content {display: flex; height: 150px;} |
| | | .content-text {font-size: 14px; color: #666;} |
| | | .itemstyle {margin-top: 30px; margin-left: 5%;} |
| | | .headerstyle {width: 90%;} |
| | | </style> |