소스 검색

修改bug

chenrui 2 달 전
부모
커밋
0258a5fc7c
2개의 변경된 파일12개의 추가작업 그리고 6개의 파일을 삭제
  1. 7 5
      src/views/salesManagement/salesQueryNew/printModal.vue
  2. 5 1
      src/views/setting/tireSubsidySetting/rebateAddModal.vue

+ 7 - 5
src/views/salesManagement/salesQueryNew/printModal.vue

@@ -65,10 +65,10 @@
           </a-radio-group>
         </a-form-model-item>
         <!-- 平均公斤单价 -->
-        <a-form-model-item label="平均公斤单价" prop="averagePrice" v-if="$hasPermissions('B_salesDetail_costPrice')&&$hasPermissions('B_salesDetail_salesPrice')">
+        <a-form-model-item label="平均公斤单价" prop="averagePrice" v-if="nowType=='export'&&$hasPermissions('B_salesDetail_costPrice')&&$hasPermissions('B_salesDetail_salesPrice')">
           <a-radio-group v-model="form.averagePrice">
-            <a-radio :value="form.dataScope == 'ENOUGH' ? 'SALES_BILL_COST_NOT_LACK_WEIGHT':'SALES_BILL_COST_WEIGHT'">导出</a-radio>
-            <a-radio :value="form.dataScope == 'ENOUGH' ? 'SALES_BILL_NOT_LACK_WEIGHT':'SALES_BILL_WEIGHT'">不导出</a-radio>
+            <a-radio :value="1">导出</a-radio>
+            <a-radio :value="0">不导出</a-radio>
           </a-radio-group>
         </a-form-model-item>
       </a-form-model>
@@ -190,12 +190,14 @@ export default {
             if (!_this.$hasPermissions('B_salesDetailExport_salesPrice')) {
               _this.form.priceType = _this.form.dataScope == 'ENOUGH' ? 'SALES_BILL_NOT_LACK' : 'SALES_BILL'
             }
+            if (_this.form.averagePrice == '1') {
+              _this.form.priceType += '_WEIGHT'
+            }
             const obj = {
               salesBillSn: _this.itemData.salesBillSn,
               priceType: _this.form.priceType,
               dataScope: _this.form.dataScope == 'all' ? '' : _this.form.dataScope,
-              type: isPrint || 'preview',
-              averagePrice: _this.form.averagePrice
+              type: isPrint || 'preview'
             }
             _this.$emit('ok', obj)
           }

+ 5 - 1
src/views/setting/tireSubsidySetting/rebateAddModal.vue

@@ -25,7 +25,6 @@
             <a-input-number
               id="costAddModal-ruleValue1"
               v-model="form.ruleValue1"
-              :min="0.01"
               style="width:90%;"
               :max="999999"
               :precision="2"
@@ -109,6 +108,10 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          if (_this.form.ruleValue1 <= 0) {
+            _this.$message.warning('请输入正数')
+            return
+          }
           _this.form.ruleType = _this.pageType
           _this.spinning = true
           const ajaxName = _this.itemSn ? editSubsidyRule : subsidyRuleSave
@@ -187,6 +190,7 @@ export default {
       this.itemSn = null
       this.form.effectType = 0
       this.rebateList = null
+      this.timeInfo = null
       this.$refs.ruleForm.resetFields()
     }
   },