|
@@ -11,6 +11,7 @@
|
|
|
</template>
|
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
|
<template slot="extra" v-if="$hasPermissions('B_salesPrint')">
|
|
|
+ <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
|
|
|
<Print :disabled="dataSource.length==0" @handlePrint="handlePrint"></Print>
|
|
|
</template>
|
|
|
</a-page-header>
|
|
@@ -197,7 +198,8 @@ export default {
|
|
|
productCode: '',
|
|
|
orderBy: 'sales_bill_detail.CREATE_DATE desc'
|
|
|
},
|
|
|
- tbForm: [],
|
|
|
+ tbForm: [], // 同步操作
|
|
|
+ printOrgCode: false, // 打印原创编码
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
@@ -263,7 +265,7 @@ export default {
|
|
|
tbFormChange (e, val) {
|
|
|
console.log(`checked = ${e.target.checked}`, val)
|
|
|
this.tbForm = []
|
|
|
- if (e.target.checked || val == 1) {
|
|
|
+ if (e.target.checked) {
|
|
|
for (let i = val; i >= 0; i--) {
|
|
|
this.tbForm.push(i)
|
|
|
}
|
|
@@ -583,11 +585,18 @@ export default {
|
|
|
vm.$nextTick(() => {
|
|
|
vm.orderId = vm.$route.params.id
|
|
|
vm.salesBillSn = vm.$route.params.sn
|
|
|
+ // 是否默认打印原厂编码
|
|
|
+ vm.printOrgCode = localStorage.getItem('printOrgCode-' + this.$store.state.user.info.orgId) == 'true'
|
|
|
vm.getOrderDetail(true)
|
|
|
vm.$refs.table.refresh(true)
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ printOrgCode (newValue, oldValue) {
|
|
|
+ localStorage.setItem('printOrgCode-' + this.$store.state.user.info.orgId, newValue)
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted () {
|
|
|
this.showPage = true
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|