소스 검색

bug 修复

lilei 3 년 전
부모
커밋
265d05b208
3개의 변경된 파일19개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      src/components/tools/UserMenu.vue
  2. 7 0
      src/views/salesManagement/salesQuery/detail.vue
  3. 11 2
      src/views/salesManagement/salesQuery/edit.vue

+ 1 - 1
src/components/tools/UserMenu.vue

@@ -126,7 +126,7 @@ export default {
           setTimeout(() => {
             window.location.reload() //  刷新页面
           }, 100)
-        }).catch(err => this.requestFailed(err))
+        })
       })
     },
     requestFailed (err) {

+ 7 - 0
src/views/salesManagement/salesQuery/detail.vue

@@ -13,6 +13,7 @@
             @click.stop="handleEdit">编辑</a-button>
         </template>
         <template slot="extra" v-if="outBizSn ? $hasPermissions('B_outboundOrderDetail') : $hasPermissions('B_salesPrint')">
+          <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
           <Print :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print>
         </template>
       </a-page-header>
@@ -107,6 +108,7 @@ export default {
       spinning: false,
       disabled: false,
       showCost: false,
+      printOrgCode: false, // 打印原创编码
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -196,6 +198,8 @@ export default {
       vm.$nextTick(() => {
         vm.spinning = false
         vm.disabled = false
+        // 是否默认打印原厂编码
+        vm.printOrgCode = localStorage.getItem('printOrgCode-' + this.$store.state.user.info.orgId) == 'true'
         vm.$refs.table.refresh(true)
         vm.getDetail()
       })
@@ -208,6 +212,9 @@ export default {
       } else {
         this.columns.splice(4, 1)
       }
+    },
+    printOrgCode (newValue, oldValue) {
+      localStorage.setItem('printOrgCode-' + this.$store.state.user.info.orgId, newValue)
     }
   },
   mounted () {

+ 11 - 2
src/views/salesManagement/salesQuery/edit.vue

@@ -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) { // 页签刷新时调用