lilei 2 vuotta sitten
vanhempi
commit
bf57b504a2

+ 7 - 2
src/views/salesManagement/pushOrderManagement/detail.vue

@@ -257,16 +257,21 @@ export default {
         this.$refs.typePrint.setData(this.detailData, this.outBizSubSn || this.bizSn || this.$route.params.sn)
       }
     },
-    // 发货分类打印
+    // 发货分类打印,导出
     handlePrintOk (obj, taskName, type) {
       const _this = this
       const params = {
         type: this.nowPrintType,
         dispatchBillSn: this.outBizSubSn || this.bizSn || this.$route.params.sn
       }
-
+      // 打印
       if (type != 'export') {
         _this.spinning = true
+
+        // 货架编号
+        if (obj.orderBy) {
+          params.type = params.type + '_STACK_PLACE'
+        }
         printFun(
           dispatchDetailPrint,
           Object.assign(params, obj || {}),

+ 16 - 2
src/views/salesManagement/pushOrderManagement/sendTypeModal.vue

@@ -40,6 +40,13 @@
             </a-select-option>
           </a-select>
         </a-form-model-item>
+        <a-form-model-item label="货架编号" prop="orderBy" v-if="nowType=='print'">
+          <a-radio-group v-model="form.orderBy">
+            <a-radio value="sbd.STACK_PLACE_CODE ASC">打印(↑升序)</a-radio>
+            <a-radio value="sbd.STACK_PLACE_CODE DESC">打印(↓降序)</a-radio>
+            <a-radio value="-1">不打印</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
         <a-button id="pushOrderManagement-print-back" @click="handleCancel">取消</a-button>
@@ -92,10 +99,12 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       form: {
-        id: 'all'
+        id: 'all',
+        orderBy: undefined
       },
       rules: {
-        id: [{ required: true, message: '请选择产品分类', trigger: 'change' }]
+        id: [{ required: true, message: '请选择产品分类', trigger: 'change' }],
+        orderBy: [{ required: true, message: '请选择货架编号', trigger: 'change' }]
       },
       formItemLayout: {
         labelCol: { span: 6 },
@@ -120,6 +129,10 @@ export default {
               dispatchBillSn: this.detailData.dispatchBillSn,
               dispatchBillNo: this.detailData.dispatchBillNo
             }
+            // 打印货架编号
+            if (_this.form.orderBy != '-1') {
+              obj.orderBy = _this.form.orderBy
+            }
             _this.$emit('ok', obj, '发货分类', type)
           }
           _this.isShow = false
@@ -134,6 +147,7 @@ export default {
       this.isShow = false
       this.$refs.ruleForm.resetFields()
       this.form.id = 'all'
+      this.form.orderBy = undefined
     },
     // 获取该销售单产品二级分类
     getTypeData (dispatchBillSn) {

+ 18 - 3
src/views/salesManagement/salesQuery/printModal.vue

@@ -35,7 +35,7 @@
           </a-radio-group>
         </a-form-model-item>
         <a-form-model-item label="产品售价" prop="priceType">
-          <!-- 分类打印 -->
+          <!-- 销售分类打印 -->
           <a-radio-group v-model="form.priceType" v-if="nowType=='SALES_BILL_TYPE'">
             <a-radio value="SALES_BILL_TYPE_COST">打印</a-radio>
             <a-radio value="SALES_BILL_TYPE">不打印</a-radio>
@@ -51,6 +51,13 @@
             <a-radio :value="form.dataScope == 'ENOUGH' ? 'SALES_BILL_NOT_LACK':'SALES_BILL'">不导出</a-radio>
           </a-radio-group>
         </a-form-model-item>
+        <a-form-model-item label="货架编号" prop="orderBy" v-if="nowType=='SALES_BILL_TYPE'">
+          <a-radio-group v-model="form.orderBy">
+            <a-radio value="sbd.STACK_PLACE_CODE ASC">打印(↑升序)</a-radio>
+            <a-radio value="sbd.STACK_PLACE_CODE DESC">打印(↓降序)</a-radio>
+            <a-radio value="-1">不打印</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
         <a-button :type="nowType=='export'?'primary':''" id="sales-print-save" @click="handleSave()">{{ nowType=='export' ? '导出' : '打印预览' }}</a-button>
@@ -85,12 +92,14 @@ export default {
       form: {
         id: 'all',
         dataScope: 'all',
-        priceType: undefined
+        priceType: undefined,
+        orderBy: undefined
       },
       rules: {
         id: [{ required: true, message: '请选择产品分类', trigger: 'change' }],
         dataScope: [{ required: true, message: '请选择是否缺货产品', trigger: 'change' }],
-        priceType: [{ required: true, message: '请选择产品售价', trigger: 'change' }]
+        priceType: [{ required: true, message: '请选择产品售价', trigger: 'change' }],
+        orderBy: [{ required: true, message: '请选择货架编号', trigger: 'change' }]
       },
       formItemLayout: {
         labelCol: { span: 6 },
@@ -119,6 +128,7 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          // 分类打印
           if (_this.nowType == 'SALES_BILL_TYPE') {
             const item = _this.typeList.find(item => item.id == _this.form.id)
             if (item) {
@@ -129,6 +139,11 @@ export default {
                 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') {

+ 4 - 0
src/views/salesManagement/stockPrint/list.vue

@@ -303,6 +303,10 @@ export default {
         type: 'DISPATCH_BILL_TYPE',
         dispatchBillSn: obj.dispatchBillSn
       }
+      // 货架编号
+      if (obj.orderBy) {
+        params.type = params.type + '_STACK_PLACE'
+      }
       _this.spinning = true
       printFun(
         dispatchDetailPrint,