chenrui пре 2 месеци
родитељ
комит
239e1a6b52

+ 1 - 1
src/views/productManagement/productInfo/detailModal.vue

@@ -37,7 +37,7 @@
         <a-descriptions-item label="单位:">{{ detailsData&&detailsData.unit || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品尺寸:">{{ detailsData&&detailsData.size || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品内盒尺寸:">{{ detailsData&&detailsData.boxSize || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="产品重量(g):">{{ detailsData&&detailsData.weight || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="产品重量(g):" v-if="detailsData&&(detailsData.weight||detailsData.weight==0)">{{ detailsData.weight }}({{ detailsData.weight/1000 }}kg)</a-descriptions-item>
         <a-descriptions-item label="颜色:" span="2">{{ detailsData&&detailsData.color || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品说明:" span="2">
           <div v-html="detailsData.description" v-if="detailsData&&detailsData.description" style="overflow-y: scroll;height: 300px;"></div>

+ 9 - 2
src/views/productManagement/productInfo/edit.vue

@@ -171,8 +171,15 @@
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
               <a-form-model-item label="产品重量(g)" prop="weight">
-                  <a-input-number style="width:80%;"  id="productInfoEdit-weight" v-model="form.weight" :min="1" :max="999999" placeholder="请输入产品重量,注意单位为g(正整数)"/>
-                  <span v-if="form.weight">({{form.weight/1000}}kg)</span>
+                <a-input-number
+                  style="width:80%;"
+                  :precision="0"
+                  id="productInfoEdit-weight"
+                  v-model="form.weight"
+                  :min="1"
+                  :max="999999"
+                  placeholder="请输入产品重量,注意单位为g(正整数)"/>
+                <span v-if="form.weight">({{ form.weight/1000 }}kg)</span>
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">

+ 1 - 3
src/views/reportData/tireSubsidyReport/supplierRebateList.vue

@@ -17,8 +17,6 @@
                   <a-popover placement="top">
                     <template slot="content">
                       <p>1、销售单(非转单)下推时间</p>
-                      <p>2、销售单(转单)转单完结时间</p>
-                      <p>3、销售退货单客服确认时间</p>
                     </template>
                     查询月份 <a-icon type="question-circle" />
                   </a-popover>
@@ -237,7 +235,7 @@ export default {
       // 售价权限
       if (_this.$hasPermissions('M_tireSubsidyList_salesPrice')) {
         arr.push({ title: '实售金额', dataIndex: 'totalRealAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice({ title: '平均售价公斤单价', dataIndex: 'averageRealAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.push({ title: '平均售价公斤单价', dataIndex: 'averageRealAmount', width: '100px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       if (_this.$hasPermissions('M_tireSubsidyList_costPrice')) {
         arr.push({ title: '返利金额', dataIndex: 'totalFactoryRebate', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })

+ 15 - 4
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -69,6 +69,11 @@ export default {
       type: Boolean,
       default: false
     },
+    // 是否显示平均公斤单价
+    showAveragePrice: {
+      type: Boolean,
+      default: false
+    },
     // 权限码
     authCode: {
       type: String,
@@ -281,10 +286,16 @@ export default {
         arr.push({ title: '转采购额数量', field: 'convertPromoGiftsQty', width: 100, key: 'z', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.convertPromoGiftsFlag ? numsFormat(row[column.field]) : '--' } })
       }
       arr.push({ title: '已取消数', field: 'cancelQty', width: 80, key: 'q', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
-      arr.push({ title: '单重', field: 'cancelQty', width: 80, key: 'q1', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
-      arr.push({ title: '合计重量', field: 'cancelQty', width: 80, key: 'q2', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
-      arr.push({ title: '平均成本公斤单价', field: 'cancelQty', width: 100, key: 'q3', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
-      arr.push({ title: '平均售价公斤单价', field: 'cancelQty', width: 100, key: 'q4', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
+      if (this.showAveragePrice) {
+        arr.push({ title: '单重', field: 'weight', width: 80, key: 'q1', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
+        arr.push({ title: '合计重量', field: 'totalWeight', width: 80, key: 'q2', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
+        if (this.$hasPermissions(this.authCode + '_costPrice')) {
+          arr.push({ title: '平均成本公斤单价', field: 'weightAvgCost', width: 100, key: 'q3', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
+        }
+        if (this.$hasPermissions(this.authCode + '_salesPrice')) {
+          arr.push({ title: '平均售价公斤单价', field: 'weightAvgPrice', width: 100, key: 'q4', align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
+        }
+      }
       return arr
     },
     // 是否有可转采购额

+ 24 - 28
src/views/salesManagement/salesQueryNew/detail.vue

@@ -72,28 +72,27 @@
         <a-alert type="info" style="margin-bottom: 10px;">
           <div slot="message">
             <div class="form-grid">
-              <div v-if="$hasPermissions(authCode + '_costPrice')"><label>总成本:</label><strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;</div>
-              <div><label>总数量:</label><strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;</div>
-              <div><label>已取消数量:</label><strong>{{ detailData&&(detailData.totalCancelQty || detailData.totalCancelQty==0) ? detailData.totalCancelQty : '--' }}</strong>;</div>
-              <div><label>已下推数量:</label><strong>{{ detailData&&(detailData.totalPushedQty || detailData.totalPushedQty==0) ? detailData.totalPushedQty : '--' }}</strong>;</div>
-              <div><label>待下推数量:</label><strong>{{ detailData&&(detailData.totalUnpushedQty || detailData.totalUnpushedQty==0) ? detailData.totalUnpushedQty : '--' }}</strong>;</div>
-              <div><label>已发货数量:</label><strong>{{ detailData&&(detailData.totalDispatchQty || detailData.totalDispatchQty==0) ? detailData.totalDispatchQty : '--' }}</strong>;</div>
-              <div><label>待发货数量:</label><strong>{{ detailData&&(detailData.totalUndispatchQty || detailData.totalUndispatchQty==0) ? detailData.totalUndispatchQty : '--' }}</strong>;</div>
-              <div><label>单重(kg):</label><strong>{{ detailData&&(detailData.weight || detailData.weight==0) ? detailData.weight : '--' }}</strong>;</div>
-              <div style="width:190px;" v-if="$hasPermissions(authCode + '_costPrice')"><label style="width:108px;">平均成本公斤单价:</label><strong>{{ detailData&&(detailData.averageCost || detailData.averageCost==0) ? toThousands(detailData.averageCost) : '--' }}</strong>;</div>
-              <div v-if="isCityPrice"><label>市级总售价:</label><strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;</div>
+              <div v-if="$hasPermissions(authCode + '_costPrice')">总成本:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;</div>
+              <div>总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;</div>
+              <div>已取消数量:<strong>{{ detailData&&(detailData.totalCancelQty || detailData.totalCancelQty==0) ? detailData.totalCancelQty : '--' }}</strong>;</div>
+              <div>已下推数量:<strong>{{ detailData&&(detailData.totalPushedQty || detailData.totalPushedQty==0) ? detailData.totalPushedQty : '--' }}</strong>;</div>
+              <div>待下推数量:<strong>{{ detailData&&(detailData.totalUnpushedQty || detailData.totalUnpushedQty==0) ? detailData.totalUnpushedQty : '--' }}</strong>;</div>
+              <div>已发货数量:<strong>{{ detailData&&(detailData.totalDispatchQty || detailData.totalDispatchQty==0) ? detailData.totalDispatchQty : '--' }}</strong>;</div>
+              <div>待发货数量:<strong>{{ detailData&&(detailData.totalUndispatchQty || detailData.totalUndispatchQty==0) ? detailData.totalUndispatchQty : '--' }}</strong>;</div>
+              <div style="width:190px;" v-if="$hasPermissions(authCode + '_costPrice')&&isAveragePrice"><label style="width:108px;">平均成本公斤单价:<strong>{{ detailData&&(detailData.totalWeightAvgCost || detailData.totalWeightAvgCost==0) ? toThousands(detailData.totalWeightAvgCost) : '--' }}</strong>;</label></div>
+              <div v-if="isAveragePrice">合计重量(kg):<strong>{{ detailData&&(detailData.totalWeight || detailData.totalWeight==0) ? detailData.totalWeight : '--' }}</strong>;</div>
+              <div v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalDiscountAmount" style="color: red;">优惠金额:<strong>{{ Number(detailData.totalDiscountAmount).toFixed(2) }}</strong>;</div>
               </br>
-              <div v-if="$hasPermissions(authCode + '_costPrice')"><label>总毛利:</label><strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;</div>
-              <div v-if="$hasPermissions(authCode + '_salesPrice')"><label>总售价:</label><strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;</div>
-              <div v-if="$hasPermissions(authCode + '_salesPrice')"><label>已取消金额:</label><strong>{{ detailData&&(detailData.totalCancelAmount || detailData.totalCancelAmount==0) ? toThousands(detailData.totalCancelAmount) : '--' }}</strong>;</div>
-              <div v-if="$hasPermissions(authCode + '_salesPrice')"><label>已下推金额:</label><strong>{{ detailData&&(detailData.totalPushedAmount || detailData.totalPushedAmount==0) ? toThousands(detailData.totalPushedAmount) : '--' }}</strong>;</div>
-              <div v-if="$hasPermissions(authCode + '_salesPrice')"><label>待下推金额:</label><strong>{{ detailData&&(detailData.totalUnpushedAmount || detailData.totalUnpushedAmount==0) ? toThousands(detailData.totalUnpushedAmount) : '--' }}</strong>;</div>
-              <div v-if="$hasPermissions(authCode + '_salesPrice')"><label>已发货金额:</label><strong>{{ detailData&&(detailData.totalDispatchAmount || detailData.totalDispatchAmount==0) ? toThousands(detailData.totalDispatchAmount) : '--' }}</strong>;</div>
-              <div v-if="$hasPermissions(authCode + '_salesPrice')"><label>待发货金额:</label><strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</div>
-              <div><label>合计重量(kg):</label><strong>{{ detailData&&(detailData.totalWeight || detailData.totalWeight==0) ? detailData.totalWeight : '--' }}</strong>;</div>
-              <div style="width:190px;" v-if="$hasPermissions(authCode + '_salesPrice')"><label style="width:108px;">平均售价公斤单价:</label><strong>{{ detailData&&(detailData.averageRealAmount || detailData.averageRealAmount==0) ? toThousands(detailData.averageRealAmount) : '--' }}</strong>;</div>
-              <div v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalDiscountAmount" style="color: red;"><label>优惠金额:</label><strong>{{ Number(detailData.totalDiscountAmount).toFixed(2) }}</strong>;</div>
-              <div v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalConvertPromoGiftsAmount" style="color: red;"><label>促销产品转采购额金额:</label><strong>{{ Number(detailData.totalConvertPromoGiftsAmount).toFixed(2) }}</strong>;</div>
+              <div v-if="$hasPermissions(authCode + '_costPrice')">总毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;</div>
+              <div v-if="$hasPermissions(authCode + '_salesPrice')">总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;</div>
+              <div v-if="$hasPermissions(authCode + '_salesPrice')">已取消金额:<strong>{{ detailData&&(detailData.totalCancelAmount || detailData.totalCancelAmount==0) ? toThousands(detailData.totalCancelAmount) : '--' }}</strong>;</div>
+              <div v-if="$hasPermissions(authCode + '_salesPrice')">已下推金额:<strong>{{ detailData&&(detailData.totalPushedAmount || detailData.totalPushedAmount==0) ? toThousands(detailData.totalPushedAmount) : '--' }}</strong>;</div>
+              <div v-if="$hasPermissions(authCode + '_salesPrice')">待下推金额:<strong>{{ detailData&&(detailData.totalUnpushedAmount || detailData.totalUnpushedAmount==0) ? toThousands(detailData.totalUnpushedAmount) : '--' }}</strong>;</div>
+              <div v-if="$hasPermissions(authCode + '_salesPrice')">已发货金额:<strong>{{ detailData&&(detailData.totalDispatchAmount || detailData.totalDispatchAmount==0) ? toThousands(detailData.totalDispatchAmount) : '--' }}</strong>;</div>
+              <div v-if="$hasPermissions(authCode + '_salesPrice')">待发货金额:<strong>{{ detailData&&(detailData.totalUndispatchAmount || detailData.totalUndispatchAmount==0) ? toThousands(detailData.totalUndispatchAmount) : '--' }}</strong>;</div>
+              <div style="width:190px;" v-if="$hasPermissions(authCode + '_salesPrice')&&isAveragePrice"><label style="width:108px;">平均售价公斤单价:<strong>{{ detailData&&(detailData.totalWeightAvgPrice || detailData.totalWeightAvgPrice==0) ? toThousands(detailData.totalWeightAvgPrice) : '--' }}</strong>;</label></div>
+              <div v-if="isCityPrice">&nbsp;&nbsp;市级总售价:<strong>{{ detailData&&(detailData.totalCityAmount || detailData.totalCityAmount==0) ? toThousands(detailData.totalCityAmount) : '--' }}</strong>;</div>
+              <div v-if="$hasPermissions(authCode + '_salesPrice')&&detailData&&detailData.totalConvertPromoGiftsAmount" style="color: red;width:170px;">促销产品转采购额金额:<strong>{{ Number(detailData.totalConvertPromoGiftsAmount).toFixed(2) }}</strong>;</div>
             </div>
           </div>
         </a-alert>
@@ -162,7 +161,7 @@
               <a-button id="salesDetail-updateStock" type="primary" v-if="showStock" @click="getThreeStock" class="button-info">第三方库存</a-button>
               <a-button id="salesDetail-stockOut" v-if="detailData && (detailData.billStatus == 'WAIT_AUDIT' || detailData.billStatus == 'HQ_CHANGE')" type="link" @click="openStockOut">缺货明细</a-button>
               <a-checkbox id="salesDetail-cityPrice" v-model="isCityPrice" v-if="$hasPermissions(authCode + '_cityPrice')"><span style="display: inline-block;margin-top: 1px;">市级价</span></a-checkbox>
-              <a-checkbox id="salesDetail-cityPrice" v-model="isCityPrice" v-if="$hasPermissions(authCode + '_costPrice')&&$hasPermissions(authCode + '_salesPrice')"><span style="display: inline-block;margin-top: 1px;">市级价</span></a-checkbox>
+              <a-checkbox id="salesDetail-cityPrice" v-model="isAveragePrice" v-if="$hasPermissions(authCode + '_costPrice')&&$hasPermissions(authCode + '_salesPrice')"><span style="display: inline-block;margin-top: 1px;">平均公斤单价</span></a-checkbox>
             </div>
           </div>
         </div>
@@ -179,6 +178,7 @@
             :chooseList="chooseDealerList"
             :transferQty="transferQty"
             :showCityPrice="isCityPrice"
+            :showAveragePrice="isAveragePrice"
             :showTransferDealer="showTransferDealer">
           </detailProductList>
         </div>
@@ -323,6 +323,7 @@ export default {
       detailData: null, //  详情数据
       nowType: null, // 打印导出类型
       isCityPrice: false, //  是否显示市级价
+      isAveragePrice: false, // 是否显示
       visibleAudit: false, // 审核弹框
       spinningAudit: false, // 审核loading
       auditText: null, // 审核备注信息
@@ -779,12 +780,7 @@ export default {
     .form-grid{
       div{
         display: inline-block;
-        width:130px;
-        label{
-          display: inline-block;
-          // text-align: right;
-          // width:90px;
-        }
+        width:136px;
       }
     }
   }

+ 13 - 3
src/views/salesManagement/salesQueryNew/printModal.vue

@@ -64,6 +64,13 @@
             <a-radio value="-1">不打印</a-radio>
           </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-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-group>
+        </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
         <a-button id="sales-print-back" @click="isShow = false">取消</a-button>
@@ -101,14 +108,16 @@ export default {
         id: 'all',
         dataScope: 'all',
         priceType: undefined,
-        orderBy: undefined
+        orderBy: undefined,
+        averagePrice: undefined
       },
       // 选项校验
       rules: {
         id: [{ required: true, message: '请选择产品分类', trigger: 'change' }],
         dataScope: [{ required: true, message: '请选择是否缺货产品', trigger: 'change' }],
         priceType: [{ required: true, message: '请选择产品售价', trigger: 'change' }],
-        orderBy: [{ required: true, message: '请选择货位编号', trigger: 'change' }]
+        orderBy: [{ required: true, message: '请选择货位编号', trigger: 'change' }],
+        averagePrice: [{ required: true, message: '请选择平均公斤单价', trigger: 'change' }]
       },
       formItemLayout: {
         labelCol: { span: 6 },
@@ -185,7 +194,8 @@ export default {
               salesBillSn: _this.itemData.salesBillSn,
               priceType: _this.form.priceType,
               dataScope: _this.form.dataScope == 'all' ? '' : _this.form.dataScope,
-              type: isPrint || 'preview'
+              type: isPrint || 'preview',
+              averagePrice: _this.form.averagePrice
             }
             _this.$emit('ok', obj)
           }

+ 3 - 2
src/views/setting/tireSubsidySetting/rebateAddModal.vue

@@ -25,9 +25,9 @@
             <a-input-number
               id="costAddModal-ruleValue1"
               v-model="form.ruleValue1"
-              :min="0"
+              :min="0.01"
               style="width:90%;"
-              :max="100"
+              :max="999999"
               :precision="2"
               placeholder="请输入返利基数"/>
             <span style="margin-left:10px;">元</span>
@@ -184,6 +184,7 @@ export default {
       this.form.dealerSn = undefined
       this.form.ruleValue1 = undefined
       this.form.ruleType = undefined
+      this.itemSn = null
       this.form.effectType = 0
       this.rebateList = null
       this.$refs.ruleForm.resetFields()