diff --git a/src/App.vue b/src/App.vue index 0de9ec11..a77ab1ab 100644 --- a/src/App.vue +++ b/src/App.vue @@ -49,7 +49,6 @@ export default{ ' ████____███', ' █ _███_ _█_███' ].join('\n'))) - window.onbeforeunload = function() { return '确认离开页面?!' } }, beforeDestroy() { diff --git a/src/views/AdvancePay/AddAdvancePay.vue b/src/views/AdvancePay/AddAdvancePay.vue index 0f1fa501..eec6a50d 100644 --- a/src/views/AdvancePay/AddAdvancePay.vue +++ b/src/views/AdvancePay/AddAdvancePay.vue @@ -263,11 +263,20 @@ export default { mounted() { this.getinformation() + this.getcurrency() }, beforeCreate() { _that = this }, methods: { + getcurrency() { + const mycountry = this.$store.getters.countryId + if (mycountry === 1) { + this.personalForm.currency = '3' + } else if (mycountry === 2) { + this.personalForm.currency = '1' + } + }, handerchoose(val) { // console.log(val) // const needratio = this.ratios.find(item => { diff --git a/src/views/CostInvoice/AddCostInvoice.vue b/src/views/CostInvoice/AddCostInvoice.vue index 82a9e7f5..8b3cbc2b 100644 --- a/src/views/CostInvoice/AddCostInvoice.vue +++ b/src/views/CostInvoice/AddCostInvoice.vue @@ -370,11 +370,20 @@ export default { mounted() { this.getinformation() + this.getcurrency() }, beforeCreate() { _that = this }, methods: { + getcurrency() { + const mycountry = this.$store.getters.countryId + if (mycountry === 1) { + this.personalForm.currency = '3' + } else if (mycountry === 2) { + this.personalForm.currency = '1' + } + }, change2(val) { console.log('val', val) for (let i = 0; i < this.costs.length; i++) { @@ -720,6 +729,7 @@ export default { currency: '1', retreatDate: null } + this.getcurrency() this.getdatatime() this.supplierId = null this.inquiryPersonId = null diff --git a/src/views/Expenses/AddExpenses.vue b/src/views/Expenses/AddExpenses.vue index ae522ddd..c330b04f 100644 --- a/src/views/Expenses/AddExpenses.vue +++ b/src/views/Expenses/AddExpenses.vue @@ -274,11 +274,20 @@ export default { this.getTypes() this.gettree() this.getitemList() + this.getcurrency() }, beforeCreate() { _that = this }, methods: { + getcurrency() { + const mycountry = this.$store.getters.countryId + if (mycountry === 1) { + this.personalForm.currency = '3' + } else if (mycountry === 2) { + this.personalForm.currency = '1' + } + }, getitemList() { console.log('this.$store.getters.repositoryId', this.$store.getters.repositoryId) if (this.$store.getters.repositoryId === 0) { @@ -516,6 +525,7 @@ export default { }, // 清空记录 restAllForm() { + this.getcurrency() // this.personalForm = { // createPersonId: this.$store.getters.userId, // countryId: this.$store.getters.countryId, diff --git a/src/views/Invoice/AddInvoice.vue b/src/views/Invoice/AddInvoice.vue index af7adb19..984d0e78 100644 --- a/src/views/Invoice/AddInvoice.vue +++ b/src/views/Invoice/AddInvoice.vue @@ -249,10 +249,21 @@ export default { this.getTypes() this.getways() }, + mounted() { + this.getcurrency() + }, beforeCreate() { _that = this }, methods: { + getcurrency() { + const mycountry = this.$store.getters.countryId + if (mycountry === 1) { + this.personalForm.currency = '3' + } else if (mycountry === 2) { + this.personalForm.currency = '1' + } + }, getways() { // 交货方式 searchCategory(2).then(res => { @@ -363,6 +374,7 @@ export default { regionId: this.$store.getters.regionId, isVat: 1 } + this.getcurrency() this.supplierId = null this.inquiryPersonId = null this.handlePersonId = null diff --git a/src/views/PrepReceipt/AddPrepReceipt.vue b/src/views/PrepReceipt/AddPrepReceipt.vue index fb429846..16550737 100644 --- a/src/views/PrepReceipt/AddPrepReceipt.vue +++ b/src/views/PrepReceipt/AddPrepReceipt.vue @@ -249,11 +249,20 @@ export default { mounted() { this.getinformation() + this.getcurrency() }, beforeCreate() { _that = this }, methods: { + getcurrency() { + const mycountry = this.$store.getters.countryId + if (mycountry === 1) { + this.personalForm.currency = '3' + } else if (mycountry === 2) { + this.personalForm.currency = '1' + } + }, clearCustomer() { this.personalForm.customerName = '' this.personalForm.agentId = '' @@ -428,6 +437,7 @@ export default { receiptDate: null } this.receiptPersonId = null + this.getcurrency() }, // 保存操作 handlesave() { diff --git a/src/views/StockInvoice/AddStockInvoice.vue b/src/views/StockInvoice/AddStockInvoice.vue index 6d796c49..452a1f3e 100644 --- a/src/views/StockInvoice/AddStockInvoice.vue +++ b/src/views/StockInvoice/AddStockInvoice.vue @@ -506,14 +506,22 @@ export default { this.getways() this.getdatatime() }, - mounted() { this.getinformation() + this.getcurrency() }, beforeCreate() { _that = this }, methods: { + getcurrency() { + const mycountry = this.$store.getters.countryId + if (mycountry === 1) { + this.personalForm.currency = '3' + } else if (mycountry === 2) { + this.personalForm.currency = '1' + } + }, // 重置一下下拉 change() { this.$forceUpdate() @@ -931,6 +939,7 @@ export default { payDate: null, invoiceType: '1' } + this.getcurrency() this.supplierId = null this.inquiryPersonId = null this.handlePersonId = this.$store.getters.name diff --git a/src/views/Storagemove/components/MyEdit3.vue b/src/views/Storagemove/components/MyEdit3.vue index 067816ac..a0cfac7b 100644 --- a/src/views/Storagemove/components/MyEdit3.vue +++ b/src/views/Storagemove/components/MyEdit3.vue @@ -710,6 +710,13 @@ export default { if (res.data.ret === 200) { row.data.stat = 2 that.ischeck = false + } else { + this.$notify.error({ + title: 'wrong', + message: res.data.msg, + offset: 100 + }) + that.ischeck = false } }) } else { diff --git a/src/views/Transfer/AddTransfer.vue b/src/views/Transfer/AddTransfer.vue index d0ecafa5..b7b9d018 100644 --- a/src/views/Transfer/AddTransfer.vue +++ b/src/views/Transfer/AddTransfer.vue @@ -323,11 +323,20 @@ export default { this.handlechange4() this.judgedirction() this.getaccounts2() + this.getcurrency() }, beforeCreate() { _that = this }, methods: { + getcurrency() { + const mycountry = this.$store.getters.countryId + if (mycountry === 1) { + this.personalForm.currency = '3' + } else if (mycountry === 2) { + this.personalForm.currency = '1' + } + }, test2(row, val) { console.log(row, val) const accountsname = this.accountcodes.find(item => { @@ -684,6 +693,7 @@ export default { currency: '1', transferType: '1' } + this.getcurrency() this.handlePersonId = this.$store.getters.name this.personalForm.handlePersonId = null this.incomeRepositoryId = null diff --git a/src/views/income/AddIncome.vue b/src/views/income/AddIncome.vue index 2a693d1b..867de99e 100644 --- a/src/views/income/AddIncome.vue +++ b/src/views/income/AddIncome.vue @@ -241,11 +241,20 @@ export default { this.getdatatime() this.getTypes() this.gettree() + this.getcurrency() }, beforeCreate() { _that = this }, methods: { + getcurrency() { + const mycountry = this.$store.getters.countryId + if (mycountry === 1) { + this.personalForm.currency = '3' + } else if (mycountry === 2) { + this.personalForm.currency = '1' + } + }, switchtreedata(val) { for (const i in val) { if (val[i].subjectNumber === '' || val[i].subjectNumber === null) { @@ -444,6 +453,7 @@ export default { currency: '1', handlePersonId: this.$store.getters.userId } + this.getcurrency() this.handlePersonId = null this.personalForm.handlePersonId = null this.incomeRepositoryId = null diff --git a/src/views/payment/AddPayment.vue b/src/views/payment/AddPayment.vue index 91a30a16..8c2c2cb4 100644 --- a/src/views/payment/AddPayment.vue +++ b/src/views/payment/AddPayment.vue @@ -490,12 +490,21 @@ export default { created() { this.getTypes() this.getways() + this.getcurrency() // this.getdatatime() }, beforeCreate() { _that = this }, methods: { + getcurrency() { + const mycountry = this.$store.getters.countryId + if (mycountry === 1) { + this.personalForm.currency = '3' + } else if (mycountry === 2) { + this.personalForm.currency = '1' + } + }, handlepaythis(row) { console.log(row) const judgemoney = Number(row.payThis) + Number(row.advanceMoney) @@ -736,6 +745,7 @@ export default { regionId: this.$store.getters.regionId, isVat: 1 } + this.getcurrency() this.getdatatime() this.supplierId = null this.handlePersonId = null