更换正式环境,测试修改
This commit is contained in:
@@ -67,16 +67,18 @@
|
||||
form.discount = (newval*100/form.price).toFixed(2)
|
||||
}
|
||||
function discountInput(newval){
|
||||
form.currentPrice=(form.price*newval/100).toFixed(2)
|
||||
form.currentPrice= uni.$utils.isMoney(form.price*newval/100).toFixed(2)
|
||||
}
|
||||
function currentPriceChange(newval){
|
||||
if(newval<0){
|
||||
form.currentPrice=0
|
||||
form.currentPrice = '0.00'
|
||||
form.discount=100
|
||||
return infoBox.showToast('实收金额不能小于0')
|
||||
}
|
||||
if(newval>props.price){
|
||||
form.currentPrice=props.price
|
||||
console.log(props.price)
|
||||
console.log(newval)
|
||||
if(newval > props.price){
|
||||
form.currentPrice = (uni.$utils.isMoney(props.price)*1).toFixed(2)
|
||||
form.discount=0
|
||||
return infoBox.showToast('实收金额不能大于应付金额')
|
||||
}
|
||||
@@ -95,7 +97,7 @@
|
||||
}
|
||||
|
||||
const $form = {
|
||||
price:props.price,
|
||||
price: props.price,
|
||||
currentPrice: props.price,
|
||||
discount: 100
|
||||
}
|
||||
@@ -103,7 +105,7 @@
|
||||
...$form
|
||||
})
|
||||
watch(()=>props.price,(newval)=>{
|
||||
form.price=newval
|
||||
form.price = (newval*1).toFixed(2)
|
||||
form.currentPrice=newval
|
||||
})
|
||||
function resetForm() {
|
||||
@@ -116,9 +118,10 @@
|
||||
|
||||
function open() {
|
||||
model.value.open()
|
||||
form.price=props.price
|
||||
form.price= (props.price*1).toFixed(2)
|
||||
form.discount=props.discount
|
||||
form.currentPrice=(props.discount*props.price/100).toFixed(2)
|
||||
console.log(form)
|
||||
}
|
||||
|
||||
function close() {
|
||||
|
||||
@@ -63,9 +63,7 @@
|
||||
function FileUploadselect(e) {
|
||||
for (let i in e.tempFiles) {
|
||||
const file = e.tempFiles[i]
|
||||
console.log(e)
|
||||
uploadFile(file).then(res => {
|
||||
console.log(res);
|
||||
imgList.value.push({
|
||||
url: res,
|
||||
path: file.path
|
||||
@@ -104,7 +102,6 @@
|
||||
}
|
||||
|
||||
function change() {
|
||||
console.log(getFileList());
|
||||
emits('change', getFileList())
|
||||
}
|
||||
defineExpose({
|
||||
|
||||
Reference in New Issue
Block a user