瀏覽代碼

打印控制

lilei 2 年之前
父節點
當前提交
6b99927591

+ 2 - 2
src/views/allocationManagement/transferOut/detail.vue

@@ -14,7 +14,7 @@
             @click.stop="handleEdit">编辑</a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
-        <template slot="extra" v-if="basicInfoData&&basicInfoData.printState!='UNABLE_PRINT'">
+        <template slot="extra">
           <a-button
             key="3"
             type="primary"
@@ -223,7 +223,7 @@ export default {
           billSn: objs.allocateSn,
           billNo: objs.allocateNo,
           printType: taskName + '打印'
-        })
+        }, !this.basicInfoData.printState || this.basicInfoData.printState == 'UNABLE_PRINT' || this.basicInfoData.printState == 'CANCEL_PRINT')
     },
     pageInit () {
       this.$refs.table.refresh(true)

+ 2 - 2
src/views/allocationManagement/transferOut/edit.vue

@@ -8,7 +8,7 @@
           <a id="allocateBillEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
-        <template slot="extra" v-if="basicInfoData&&basicInfoData.printState!='UNABLE_PRINT'">
+        <template slot="extra">
           <a-button
             key="3"
             type="primary"
@@ -621,7 +621,7 @@ export default {
           billSn: objs.allocateSn,
           billNo: objs.allocateNo,
           printType: taskName + '打印'
-        })
+        }, !this.basicInfoData.printState || this.basicInfoData.printState == 'UNABLE_PRINT' || this.basicInfoData.printState == 'CANCEL_PRINT')
     },
     // 刷新当前页面
     refashPage () {

+ 5 - 2
src/views/allocationManagement/transferOut/printModal.vue

@@ -39,8 +39,8 @@
       </a-form-model>
       <div class="btn-cont">
         <a-button id="allocateBill-print-close" @click="handleClose('preview')">取消</a-button>
-        <a-button id="allocateBill-print-save" @click="handleSave('preview')" style="margin-left: 15px;">打印预览</a-button>
-        <a-button type="primary" id="allocateBill-print-back" @click="handleSave('print')" style="margin-left: 15px;">确定打印</a-button>
+        <a-button id="allocateBill-print-save" type="primary" class="button-info" @click="handleSave('preview')" style="margin-left: 15px;">打印预览</a-button>
+        <a-button v-if="hidePrint" type="primary" id="allocateBill-print-back" @click="handleSave('print')" style="margin-left: 15px;">确定打印</a-button>
       </div>
     </a-spin>
   </a-modal>
@@ -93,6 +93,9 @@ export default {
         title = '调拨分类打印'
       }
       return title
+    },
+    hidePrint () {
+      return this.itemData && this.itemData.printState && this.itemData.printState != 'UNABLE_PRINT' && this.itemData.printState != 'CANCEL_PRINT'
     }
   },
   methods: {

+ 1 - 1
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -250,7 +250,7 @@ export default {
           billSn: obj.dispatchBillSn,
           billNo: obj.dispatchBillNo,
           printType: taskName + '打印'
-        }, this.detailData.printStatus == 'UNABLE_PRINT')
+        }, this.detailData.printStatus == 'UNABLE_PRINT' || this.detailData.printStatus == 'CANCEL_PRINT')
     }
   },
   mounted () {

+ 3 - 0
src/views/salesManagement/waitDispatch/dsModal.vue

@@ -50,6 +50,9 @@
               <a-radio value="UNABLE_PRINT">
                 暂不打印
               </a-radio>
+              <a-radio value="CANCEL_PRINT">
+                取消打印
+              </a-radio>
             </a-radio-group>
           </a-form-model-item>
         </a-form-model>