feat:打印部门选择
This commit is contained in:
@@ -224,7 +224,14 @@ export default {
|
||||
})
|
||||
},
|
||||
//调用send方法执行打印
|
||||
print(businessSubData) {
|
||||
print(
|
||||
businessSubData,
|
||||
printParams = {
|
||||
PrintPaperType: '64MM',
|
||||
printCopies: 1,
|
||||
showPrintDialog: false
|
||||
}
|
||||
) {
|
||||
const { printTemplate } = businessSubData
|
||||
if (!printTemplate) return uni.showToast({ title: '样品未配置打印模板', icon: 'error' })
|
||||
const me = this
|
||||
@@ -233,11 +240,11 @@ export default {
|
||||
data: [businessSubData]
|
||||
}
|
||||
let printData = {
|
||||
type: 'preview',
|
||||
type: 'print',
|
||||
...printParams,
|
||||
reportTemplate: res.content,
|
||||
reportData: JSON.stringify(reportData)
|
||||
}
|
||||
console.log(printData)
|
||||
|
||||
//连接打印服务
|
||||
let printList = uni.getStorageSync('KEY_PRINT_LIST')
|
||||
|
||||
@@ -72,6 +72,9 @@ const companyDeptStore = defineStore({
|
||||
this.onCancel()
|
||||
}
|
||||
this.close()
|
||||
},
|
||||
reset() {
|
||||
Object.assign(this.$state, defaultState())
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -3,6 +3,7 @@ import userApi from '@/nx/api/user'
|
||||
import { getSysParameterBizByName } from '@/nx/api/sys'
|
||||
import md5 from 'md5'
|
||||
import nx from '@/nx'
|
||||
import companyDeptStore from './company-dept'
|
||||
import { COMPANY_DEPT_RETRY_HEADER, VISIT_COMPANY_STORAGE_KEY, VISIT_DEPT_STORAGE_KEY } from '@/nx/config'
|
||||
// 默认用户信息
|
||||
const defaultUserInfo = {
|
||||
@@ -131,6 +132,9 @@ const user = defineStore({
|
||||
uni.removeStorageSync(COMPANY_DEPT_RETRY_HEADER)
|
||||
uni.removeStorageSync(VISIT_COMPANY_STORAGE_KEY)
|
||||
uni.removeStorageSync(VISIT_DEPT_STORAGE_KEY)
|
||||
|
||||
const deptStore = companyDeptStore()
|
||||
deptStore.reset()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user