lilei 3 vuotta sitten
vanhempi
commit
eb7a03a51f

+ 22 - 5
src/views/inventoryManagement/inventoryQuery/warehouseDetail.vue

@@ -12,7 +12,7 @@
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
             <a-row :gutter="15">
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="变动类型">
                   <v-select
                     v-model="queryParam.flowType"
@@ -23,7 +23,7 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="单据类型">
                   <v-select
                     v-model="queryParam.bizType"
@@ -34,17 +34,27 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="仓库">
                   <a-select id="inventoryQueryWarehouseDetail-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
                     <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
                   </a-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="单据审核时间">
+                  <rangeDate ref="rangeDate" @change="dateChange" />
+                </a-form-item>
+              </a-col>
               <template v-if="advanced">
                 <a-col :md="6" :sm="24">
-                  <a-form-item label="单据审核时间">
-                    <rangeDate ref="rangeDate" @change="dateChange" />
+                  <a-form-item label="关联单号">
+                    <a-input id="inventoryQueryWarehouseDetail-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="下推单号">
+                    <a-input id="inventoryQueryWarehouseDetail-bizSubNo" v-model.trim="queryParam.bizSubNo" allowClear placeholder="请输入下推单号"/>
                   </a-form-item>
                 </a-col>
                 <a-col :md="6" :sm="24">
@@ -88,6 +98,8 @@
         <a-alert type="info" style="margin-bottom:10px">
           <div class="ftext" slot="message">
             当前库存总数量(个):<strong>{{ (productTotal&&(productTotal.totalQty || productTotal.totalQty==0)) ? productTotal.totalQty : '--' }}</strong>;
+            入库总数量(个):<strong>{{ (productTotal&&(productTotal.totalPutQty || productTotal.totalPutQty==0)) ? productTotal.totalPutQty : '--' }}</strong>;
+            出库总数量(个):<strong>{{ (productTotal&&(productTotal.totalOutQty || productTotal.totalOutQty==0)) ? productTotal.totalOutQty : '--' }}</strong>;
             <span v-if="$hasPermissions('B_isShowCost')">当前库存总成本(¥):<strong>{{ (productTotal&&(productTotal.totalCost || productTotal.totalCost==0)) ? productTotal.totalCost : '--' }}</strong>。</span>
           </div>
         </a-alert>
@@ -135,6 +147,8 @@ export default {
         bizType: undefined,
         flowType: undefined,
         unitName: '',
+        bizNo: '',
+        bizSubNo: '',
         warehouseSn: undefined,
         state: undefined
       },
@@ -179,6 +193,7 @@ export default {
         { title: '批次号', dataIndex: 'stockBatchNo', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据类型', dataIndex: 'bizTypeDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '关联单号', dataIndex: 'bizNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '下推单号', dataIndex: 'bizSubNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据审核时间', dataIndex: 'auditTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位名称', dataIndex: 'unitName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '仓库', dataIndex: 'warehouseName', width: '4%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -223,6 +238,8 @@ export default {
       this.queryParam.bizType = undefined
       this.queryParam.flowType = undefined
       this.queryParam.unitName = ''
+      this.queryParam.bizSubNo = ''
+      this.queryParam.bizNo = ''
       this.queryParam.warehouseSn = undefined
       this.queryParam.state = undefined
       this.$refs.table.refresh(true)

+ 44 - 21
src/views/reportData/priceDifferenceDetailReport/list.vue

@@ -12,31 +12,36 @@
           :rules="rules"
           @keyup.enter.native="handleSearch">
           <a-row :gutter="15">
+            <a-col :md="4" :sm="24">
+              <a-form-model-item label="所在区域">
+                <subarea v-model="queryParam.subareaSn"></subarea>
+              </a-form-model-item>
+            </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="日期" prop="month">
-                <a-month-picker v-model="queryParam.month" :allowClear="false" @change="onChange" :defaultValue="moment()" style="width: 100%;" />
+              <a-form-model-item label="日期" prop="time">
+                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="3" :sm="24">
               <a-form-model-item label="省份" prop="provinceSn">
                 <a-select v-model="queryParam.provinceSn" allowClear placeholder="请选择省">
                   <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="5" :sm="24">
               <a-form-model-item label="记账门店">
                 <custList id="priceDifferenceDetailList-rebateDealer" ref="rebateDealerList" @change="rebateDealerChange"></custList>
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
+              <a-col :md="5" :sm="24">
                 <a-form-model-item label="客户名称">
                   <custList id="priceDifferenceDetailList-custList" ref="custList" :itemSn="queryParam.dealerSn" @change="custChange"></custList>
                 </a-form-model-item>
               </a-col>
             </template>
-            <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="priceDifferenceDetailList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="priceDifferenceDetailList-reset">重置</a-button>
               <a-button
@@ -79,29 +84,36 @@
 </template>
 
 <script>
-import moment from 'moment'
+import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import custList from '@/views/common/custList.vue'
 import { getArea } from '@/api/data'
+import subarea from '@/views/common/subarea.js'
+import rangeDate from '@/views/common/rangeDate.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { reportRebateReportList, reportRebateCount, reportRebateExport } from '@/api/reportData'
 export default {
-  components: { STable, VSelect, custList },
+  components: { STable, VSelect, custList, subarea, rangeDate },
   data () {
     return {
-      moment,
       spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       exportLoading: false,
       queryParam: { //  查询条件
-        month: moment().format('YYYY-MM'),
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         provinceSn: undefined,
         rebateDealerSn: undefined,
-        dealerSn: undefined
+        dealerSn: undefined,
+        subareaSn: undefined
       },
       rules: {
-        'month': [{ required: true, message: '请选择月份', trigger: 'change' }],
-        'provinceSn': [{ required: true, message: '请选择省份', trigger: 'change' }]
+        'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
+        // 'provinceSn': [{ required: true, message: '请选择省份', trigger: 'change' }]
       },
       disabled: false, //  查询、重置按钮是否可操作
       addrProvinceList: [], //  省下拉
@@ -133,14 +145,12 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '月份', dataIndex: 'month', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域', dataIndex: 'dealerSubareaNameSet', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '日期', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '省份', dataIndex: 'provinceName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '记账门店', dataIndex: 'rebateDealerName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'dealerName', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品品牌+二级分类', dataIndex: 'productBrandAndType2', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        // { title: '实售金额', dataIndex: 'totalRealAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '开单金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '直接差额', dataIndex: 'rebateAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '类型', dataIndex: 'bizType', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
@@ -152,9 +162,15 @@ export default {
     }
   },
   methods: {
-    // 月份  change
-    onChange (date, dateString) {
-      this.queryParam.month = dateString || null
+    //  创建时间  change
+    dateChange (date) {
+      if (date[0] && date[1]) {
+        this.queryParam.time = date
+      } else {
+        this.queryParam.time = []
+      }
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
     },
     // 合计
     getCount (params) {
@@ -214,10 +230,17 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.month = moment().format('YYYY-MM')
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.provinceSn = undefined
       this.queryParam.rebateDealerSn = undefined
       this.queryParam.dealerSn = undefined
+      this.queryParam.subareaSn = undefined
       this.$refs.rebateDealerList.resetForm()
       this.totalData = null
       if (this.advanced) {