| 
					
				 | 
			
			
				@@ -4,7 +4,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     :footer="null" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     :maskClosable="false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     class="sales-print-type-modal" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    title="导出Excel" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    :title="modalTit" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     v-model="isShow" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @cancel="isShow=false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     :width="600"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -26,17 +26,16 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-radio value="LESS">缺货</a-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </a-radio-group> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </a-form-model-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <a-form-model-item label="原厂编码" prop="printType"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <a-radio-group 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            v-model="form.printType"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <a-radio value="SALES_BILL_ORIG_CODE">导出</a-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <a-radio value="SALES_BILL_NOT_LACK_ORIG_CODE">不导出</a-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-form-model-item label="原厂编码" prop="orgCode"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <a-radio-group v-model="form.orgCode"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-radio value="1">导出</a-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-radio value="0">不导出</a-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </a-radio-group> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </a-form-model-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </a-form-model> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div class="btn-cont"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <a-button id="sales-print-save" type="primary" @click="handleSave">导出</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <a-button id="sales-print-back" @click="handleCancel" style="margin-left: 15px;">取消</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-button id="sales-print-back" @click="handleCancel">取消</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-button type="primary" style="margin-left: 15px;" id="sales-print-save" @click="handleSave">导出</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </a-spin> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </a-modal> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -55,6 +54,10 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       default: () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    nowType: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      type: String, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      default: '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   data () { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -63,17 +66,25 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       form: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         id: 'all', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataScope: 'all', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        orderBy: undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        priceType: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        orgCode: "1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       rules: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        id: [{ required: true, message: '请选择产品分类', trigger: 'change' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataScope: [{ required: true, message: '请选择是否缺货产品', trigger: 'change' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        orderBy: [{ required: true, message: '请选择原厂编码', trigger: 'change' }] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        orgCode: [{ required: true, message: '请选择原厂编码', trigger: 'change' }] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       formItemLayout: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         labelCol: { span: 6 }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         wrapperCol: { span: 15 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      spinning: false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      spinning: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      typeList: [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  computed: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    modalTit () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      return '导出Excel' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -82,63 +93,26 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.ruleForm.validate(valid => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          // 分类打印 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          if (_this.nowType == 'SALES_BILL_TYPE') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 销售分类无权限不打印 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (!_this.$hasPermissions('B_salesTypePrint_salesPrice')) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.form.priceType = 'SALES_BILL_TYPE' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            const item = _this.typeList.find(item => item.id == _this.form.id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (item) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              const obj = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                salesBillSn: _this.itemData.salesBillSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                productBrandSn: item.productBrandSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                productTypeSn3: item.productTypeSn3, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                priceType: _this.form.priceType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                type: isPrint || 'preview' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              // 打印货位编号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              if (_this.form.orderBy != '-1') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                obj.orderBy = _this.form.orderBy 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                obj.priceType = obj.priceType + '_STACK_PLACE' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.$emit('ok', obj) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else if (_this.nowType == 'SALES_BILL') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 销售打印无权限不打印 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (!_this.$hasPermissions('B_salesPrint_salesPrice')) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.form.priceType = 'SALES_BILL' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            const obj = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              salesBillSn: _this.itemData.salesBillSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              priceType: _this.form.priceType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              type: isPrint || 'preview' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _this.$emit('ok', obj) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } else if (_this.nowType == 'export') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            // 销售导出无权限不导出 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (!_this.$hasPermissions('B_salesDetailExport_salesPrice')) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.form.priceType = _this.form.dataScope == 'ENOUGH' ? 'SALES_BILL_NOT_LACK' : 'SALES_BILL' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            const obj = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              salesBillSn: _this.itemData.salesBillSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              priceType: _this.form.priceType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              dataScope: _this.form.dataScope == 'all' ? '' : _this.form.dataScope, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              type: isPrint || 'preview' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            _this.$emit('ok', obj) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          _this.isShow = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           _this.form.priceType = _this.form.dataScope == 'ENOUGH' ? 'SALES_BILL_NOT_LACK':'SALES_BILL' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           _this.form.priceType += _this.form.orgCode == "1" ? '_ORIG_CODE':'' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           const obj = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+             salesBillSn: _this.itemData.salesBillSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+             priceType: _this.form.priceType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+             dataScope: _this.form.dataScope == 'all' ? '' : _this.form.dataScope, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+             type: isPrint || 'preview' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           _this.$emit('ok', obj) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           _this.isShow = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           console.log('error submit!!') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           return false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 取消导出 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 取消选择分类 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleCancel () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.isShow = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       this.isShow = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   watch: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //  父页面传过来的弹框状态 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -153,7 +127,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           id: 'all', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           dataScope: 'all', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           priceType: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          orderBy: undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          orgCode: "1" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$refs.ruleForm.resetFields() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 |