优化退款密码
This commit is contained in:
@@ -306,7 +306,8 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<takeFoodCode ref="takeFoodCodeRef" title="支付密码" type="password" placeholder="请输入支付密码" @success="passwordSuccess" />
|
||||
<takeFoodCode ref="takeFoodCodeRef" title="支付密码" type="2" inputType="password" placeholder="请输入支付密码"
|
||||
@success="passwordSuccess" />
|
||||
<invoice ref="invoiceRef" @load-complete="invoiceLoading = false" />
|
||||
</template>
|
||||
|
||||
@@ -323,6 +324,7 @@ import {
|
||||
cloudPrinterprint,
|
||||
sendMessage,
|
||||
} from "@/api/order/index.js";
|
||||
import { queryPwdInfo } from '@/api/user.js'
|
||||
import add from "@/views/order/components/add.vue";
|
||||
import cashTable from "@/views/order/components/cashTable.vue";
|
||||
import { clearNoNum, formatDecimal } from "@/utils";
|
||||
@@ -404,15 +406,15 @@ async function passwordSuccess(pwd) {
|
||||
return item && item;
|
||||
});
|
||||
if (arr.length != 0) {
|
||||
await payreturnOrder(arr, md5(pwd), isOnline.value);
|
||||
// await payreturnOrder(arr, '', isOnline.value);
|
||||
// await payreturnOrder(arr, md5(pwd), isOnline.value);
|
||||
await payreturnOrder(arr, pwd ? md5(pwd) : '', isOnline.value);
|
||||
changechecked.value = false;
|
||||
recharge.value = false;
|
||||
itemboxshow.value = false;
|
||||
refundamount.value = 0;
|
||||
ElMessage.success("退款成功!");
|
||||
buttonloading.value = false;
|
||||
asyncorderfindOrder();
|
||||
await asyncorderfindOrder();
|
||||
} else {
|
||||
buttonloading.value = false;
|
||||
ElMessage.error("没有退款项目!");
|
||||
@@ -432,8 +434,13 @@ const payreturnOrderclick = lodash.debounce(
|
||||
ElMessage.error("退款金额不能为0!");
|
||||
return false;
|
||||
}
|
||||
takeFoodCodeRef.value.show();
|
||||
// passwordSuccess()
|
||||
|
||||
let res = await queryPwdInfo()
|
||||
if (res.isReturn == 1) {
|
||||
takeFoodCodeRef.value.show();
|
||||
} else {
|
||||
passwordSuccess()
|
||||
}
|
||||
},
|
||||
500,
|
||||
{ leading: true, trailing: false }
|
||||
@@ -518,6 +525,7 @@ const print = lodash.throttle(
|
||||
}
|
||||
} else if (e == 'refund') {
|
||||
if (printStore.deviceNoteList.length) {
|
||||
console.log('本地打退票');
|
||||
normalPrintLoading.value = true
|
||||
const data = {
|
||||
shop_name: store.userInfo.shopName,
|
||||
@@ -549,6 +557,8 @@ const print = lodash.throttle(
|
||||
normalPrintLoading.value = false
|
||||
}, 1000)
|
||||
} else {
|
||||
console.log('云打退票');
|
||||
|
||||
// 云打票
|
||||
await cloudPrinterprint({
|
||||
type: 'normal',
|
||||
|
||||
Reference in New Issue
Block a user