12
This commit is contained in:
parent
0fedce8232
commit
b1b20a9a33
@ -6,7 +6,7 @@ import QRCode from 'qrcode'
|
|||||||
import { showImagePreview } from 'vant';
|
import { showImagePreview } from 'vant';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const t = useI18n();
|
const t = useI18n().t;
|
||||||
|
|
||||||
const statusLabel=[
|
const statusLabel=[
|
||||||
{label: t('collectCode.qrcode.status.paid'), value:2, color:'#18A058'},
|
{label: t('collectCode.qrcode.status.paid'), value:2, color:'#18A058'},
|
||||||
|
@ -22,7 +22,7 @@ const localState = ref({
|
|||||||
showDetail: false,
|
showDetail: false,
|
||||||
showHeight: ''
|
showHeight: ''
|
||||||
})
|
})
|
||||||
|
const {t} =useI18n()
|
||||||
const { userInfo, } = codeAuthStore()
|
const { userInfo, } = codeAuthStore()
|
||||||
const {getOfflineQrcodeList,itemList, loading: storeLoading,pageRef}= goodStore()
|
const {getOfflineQrcodeList,itemList, loading: storeLoading,pageRef}= goodStore()
|
||||||
const initData = async () => {
|
const initData = async () => {
|
||||||
@ -49,6 +49,15 @@ const confirm=async ()=>{
|
|||||||
message.warning(t('collectCode.message.lotNoRequired'))
|
message.warning(t('collectCode.message.lotNoRequired'))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
function validateNumber(num) {
|
||||||
|
const numStr = String(num)
|
||||||
|
return /^250\d{3}$/.test(numStr)
|
||||||
|
}
|
||||||
|
if (!validateNumber(createForm.value.lotNo)){
|
||||||
|
message.warning(t('collectCode.message.lotNoType'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const res=await offlineQrcodeCreate({...createForm.value,price:String(createForm.value.price)})
|
const res=await offlineQrcodeCreate({...createForm.value,price:String(createForm.value.price)})
|
||||||
if (res.status===0){
|
if (res.status===0){
|
||||||
show.value=false
|
show.value=false
|
||||||
|
@ -429,7 +429,8 @@
|
|||||||
"message": {
|
"message": {
|
||||||
"amountRequired": "Please enter amount",
|
"amountRequired": "Please enter amount",
|
||||||
"lotNoRequired": "Please enter Lot No.",
|
"lotNoRequired": "Please enter Lot No.",
|
||||||
"deleteSuccess": "Delete successful"
|
"deleteSuccess": "Delete successful",
|
||||||
|
"lotNoType": "Lot number format error"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
|
@ -429,7 +429,8 @@
|
|||||||
"message": {
|
"message": {
|
||||||
"amountRequired": "金額を入力してください",
|
"amountRequired": "金額を入力してください",
|
||||||
"lotNoRequired": "ロット番号を入力してください",
|
"lotNoRequired": "ロット番号を入力してください",
|
||||||
"deleteSuccess": "削除成功"
|
"deleteSuccess": "削除成功",
|
||||||
|
"lotNoType": "ロット番号形式エラー"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
|
@ -431,7 +431,8 @@
|
|||||||
"message": {
|
"message": {
|
||||||
"amountRequired": "请输入金额",
|
"amountRequired": "请输入金额",
|
||||||
"lotNoRequired": "请输入Lot号",
|
"lotNoRequired": "请输入Lot号",
|
||||||
"deleteSuccess": "删除成功"
|
"deleteSuccess": "删除成功",
|
||||||
|
"lotNoType": "Lot号格式错误"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
|
@ -429,7 +429,8 @@
|
|||||||
"message": {
|
"message": {
|
||||||
"amountRequired": "請輸入金額",
|
"amountRequired": "請輸入金額",
|
||||||
"lotNoRequired": "請輸入Lot號",
|
"lotNoRequired": "請輸入Lot號",
|
||||||
"deleteSuccess": "刪除成功"
|
"deleteSuccess": "刪除成功",
|
||||||
|
"lotNoType": "Lot號格式錯誤"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../.nuxt/tsconfig.server.json"
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user