1004749546@qq.com 3 年 前
コミット
b923069145

+ 1 - 0
src/views/common/rangeDate.vue

@@ -55,6 +55,7 @@ export default {
     },
     resetDate (val) {
       this.date = val || []
+      this.$emit('change', this.date)
     }
   }
 }

+ 74 - 100
src/views/reportData/chainReceivedSendStorageReport/list.vue

@@ -26,8 +26,8 @@
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-model-item label="日期">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+            <a-form-model-item label="日期" prop="date">
+              <rangeDate ref="rangeDate" v-model="queryParam.date" @change="dateChange" />
             </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -86,6 +86,7 @@
       class="sTable"
       ref="table"
       size="small"
+      :defaultLoadData="false"
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
@@ -93,7 +94,7 @@
       bordered>
       <template slot="footer" slot-scope="currentPageData">
         <span>
-          合计: 期初数量:{{ totalData.beginQty || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期初金额:{{ totalData.beginAmount || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入数量:{{ totalData.putQty || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入金额:{{ totalData.putAmount || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 发出数量:{{ totalData.outQty || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  发出金额:{{ totalData.outAmount || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算数量:{{ totalData.endQty || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算金额:{{ totalData.endAmount || 0 }}
+          合计: 期初数量:{{ totalData.beginQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期初金额:{{ totalData.beginAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入数量:{{ totalData.putQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入金额:{{ totalData.putAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 发出数量:{{ totalData.outQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  发出金额:{{ totalData.outAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算数量:{{ totalData.endQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算金额:{{ totalData.endAmount || '--' }}
         </span>
       </template>
     </s-table>
@@ -115,6 +116,7 @@ export default {
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
+        date: [], // 日期
         targetName: undefined,
         code: '', //  产品编码
         name: '', //  产品名称
@@ -140,15 +142,12 @@ export default {
           // fixed: 'left'
         },
         { title: '产品编码',
-          dataIndex: 'code',
+          dataIndex: 'productCode',
           width: 220,
           align: 'center',
-          customRender: function (value, row, index) {
-            value = row.productEntity && row.productEntity.code ? row.productEntity.code : '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.code ? row.productEntity.code : '--'
-            return obj
+		  sorter: true,
+          customRender: function (text) {
+			  return text || '--'
           }
         },
         { title: '产品名称',
@@ -156,11 +155,7 @@ export default {
           width: 220,
           align: 'center',
           customRender: function (value, row, index) {
-            value = value || '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.name ? row.productEntity.name : '--'
-            return obj
+			  return row.productEntity && row.productEntity.name ? row.productEntity.name : '--'
           },
           ellipsis: true
         },
@@ -169,11 +164,7 @@ export default {
           align: 'center',
           width: 200,
           customRender: function (value, row, index) {
-            value = value || '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.productBrandName ? row.productEntity.productBrandName : '--'
-            return obj
+			  return row.productEntity && row.productEntity.productBrandName ? row.productEntity.productBrandName : '--'
           }
         },
         { title: '三级分类',
@@ -181,11 +172,7 @@ export default {
           width: 150,
           align: 'center',
           customRender: function (value, row, index) {
-            value = value || '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.productTypeName3 ? row.productEntity.productTypeName3 : '--'
-            return obj
+			  return row.productEntity && row.productEntity.productTypeName3 ? row.productEntity.productTypeName3 : '--'
           }
         },
         { title: '原厂编码',
@@ -193,11 +180,7 @@ export default {
           width: 220,
           align: 'center',
           customRender: function (value, row, index) {
-            value = value || '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.origCode ? row.productEntity.origCode : '--'
-            return obj
+			  return row.productEntity && row.productEntity.origCode ? row.productEntity.origCode : '--'
           }
         },
         { title: '单位',
@@ -205,64 +188,60 @@ export default {
           width: 100,
           align: 'center',
           customRender: function (value, row, index) {
-            value = value || '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.unit ? row.productEntity.unit : '--'
-            return obj
+			  return row.productEntity && row.productEntity.unit ? row.productEntity.unit : '--'
           }
         },
-        { title: '期初数量', dataIndex: 'beginQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '期初数量', dataIndex: 'beginQty', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '期初单价(¥)', dataIndex: 'beginPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '期初金额(¥)', dataIndex: 'beginAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '收入数量', dataIndex: 'putQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '期初金额(¥)', dataIndex: 'beginAmount', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收入数量', dataIndex: 'putQty', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收入单价(¥)', dataIndex: 'putPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '收入金额(¥)', dataIndex: 'putAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '发出数量', dataIndex: 'outQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收入金额(¥)', dataIndex: 'putAmount', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '发出数量', dataIndex: 'outQty', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '发出单价(¥)', dataIndex: 'outPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '发出金额(¥)', dataIndex: 'outAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结存数量', dataIndex: 'endQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '发出金额(¥)', dataIndex: 'outAmount', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '结存数量', dataIndex: 'endQty', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '结存单价(¥)', dataIndex: 'endPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结存金额(¥)', dataIndex: 'endAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '结存金额(¥)', dataIndex: 'endAmount', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
-      loadData: async parameter => {
-        if (this.queryParam.beginDate) {
-          this.disabled = true
-          const params = {
-            beginDate: this.queryParam.beginDate,
-            endDate: this.queryParam.endDate,
-            targetName: this.queryParam.targetName,
-            productEntity: {
-              code: this.queryParam.code, //  产品编码
-              name: this.queryParam.name, //  产品名称
-              origCode: this.queryParam.origCode, //  原厂编码
-              productBrandSn: this.queryParam.productBrandSn, //  产品品牌
-              productTypeSn1: this.queryParam.productTypeSn1, //  产品一级分类
-              productTypeSn2: this.queryParam.productTypeSn2, //  产品二级分类
-              productTypeSn3: this.queryParam.productTypeSn3 //  产品三级分类
-            }
-          }
-          return linkageReportPageList(Object.assign(parameter, params)).then(res => {
-            const data = res.data
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-            }
-            this.disabled = false
-            return data
-          })
-        } else {
-          return new Promise(function (resolve, reject) {
-            const data = {
-              pageNo: 1,
-              pageSize: 10,
-              list: [],
-              count: 10
-            }
-            resolve(data)
-          })
-        }
+      loadData: parameter => {
+		  if (this.queryParam.beginDate && this.queryParam.targetName) {
+			  this.disabled = true
+			  const params = {
+			    beginDate: this.queryParam.beginDate,
+			    endDate: this.queryParam.endDate,
+			    targetName: this.queryParam.targetName,
+			    productEntity: {
+			      code: this.queryParam.code, //  产品编码
+			      name: this.queryParam.name, //  产品名称
+			      origCode: this.queryParam.origCode, //  原厂编码
+			      productBrandSn: this.queryParam.productBrandSn, //  产品品牌
+			      productTypeSn1: this.queryParam.productTypeSn1, //  产品一级分类
+			      productTypeSn2: this.queryParam.productTypeSn2, //  产品二级分类
+			      productTypeSn3: this.queryParam.productTypeSn3 //  产品三级分类
+			    }
+			  }
+			  return linkageReportPageList(Object.assign(parameter, params)).then(res => {
+			  	  const data = res.data
+			  	  const no = (data.pageNo - 1) * data.pageSize
+			  	  for (var i = 0; i < data.list.length; i++) {
+			      data.list[i].no = no + i + 1
+			  	  }
+			  	  this.disabled = false
+			  	  return data
+			  })
+		  } else {
+			  return new Promise(function (resolve, reject) {
+			   const data = {
+				   pageNo: 1,
+				   pageSize: 10,
+				   list: [],
+				   count: 0
+			   }
+			   resolve(data)
+			  })
+		  }
       },
       productType: [],
       productBrandList: [], //  品牌下拉数据
@@ -274,28 +253,21 @@ export default {
   methods: {
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0]
-      this.queryParam.endDate = date[1]
+      this.queryParam.date = date
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
     },
     //  查询
     handleSearch () {
-      if (!this.queryParam.beginDate) {
-        return this.$message.error('请先选择日期')
-      }
-      this.$refs.table.refresh(true)
-      this.getTotal()
-    //   this.$refs.ruleForm.validate(valid => {
-    //     if (valid) {
-    //       if (!this.queryParam.beginDate) {
-    //         return this.$message.error('请先选择日期')
-    //       }
-    //       this.$refs.table.refresh(true)
-    // this.getTotal()
-    //     } else {
-    //       console.log('error submit!!')
-    //       return false
-    //     }
-    //   })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+          this.getTotal()
+        } else {
+          console.log('error submit!!')
+          return false
+        }
+      })
     },
     // 查询总计
     getTotal () {
@@ -332,7 +304,9 @@ export default {
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
       this.productType = []
-      this.$refs.table.refresh(true)
+      this.$refs.rangeDate.resetDate()
+      this.totalData = {}
+      this.$refs.table.clearTable()
     },
     //  产品分类  change
     changeProductType (val, opt) {

+ 49 - 68
src/views/reportData/receivedSendStorageReport/list.vue

@@ -12,23 +12,23 @@
         @keyup.enter.native="handleSearch" >
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
-            <a-form-item label="日期">
-              <rangeDate ref="rangeDate" @change="dateChange"/>
-            </a-form-item>
+            <a-form-model-item label="日期" prop="date">
+              <rangeDate ref="rangeDate" v-model="queryParam.date" @change="dateChange" />
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="产品编码">
+            <a-form-model-item label="产品编码">
               <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="产品名称">
+            <a-form-model-item label="产品名称">
               <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品品牌">
+              <a-form-model-item label="产品品牌">
                 <a-select
                   placeholder="请选择产品品牌"
                   id="productInfoList-productBrandSn"
@@ -39,10 +39,10 @@
                   :filter-option="filterOption">
                   <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
                 </a-select>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
+              <a-form-model-item label="产品分类">
                 <a-cascader
                   @change="changeProductType"
                   change-on-select
@@ -53,7 +53,7 @@
                   id="productInfoList-productType"
                   placeholder="请选择产品分类"
                   allowClear />
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
           </template>
           <a-col :md="6" :sm="24">
@@ -79,7 +79,7 @@
       bordered>
       <template slot="footer" slot-scope="currentPageData">
         <span>
-          合计: 期初数量:{{ totalData.beginQty || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期初金额:{{ totalData.beginAmount || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入数量:{{ totalData.putQty || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入金额:{{ totalData.putAmount || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 发出数量:{{ totalData.outQty || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  发出金额:{{ totalData.outAmount || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算数量:{{ totalData.endQty || 0 }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算金额:{{ totalData.endAmount || 0 }}
+          合计: 期初数量:{{ totalData.beginQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;期初金额:{{ totalData.beginAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入数量:{{ totalData.putQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 收入金额:{{ totalData.putAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 发出数量:{{ totalData.outQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  发出金额:{{ totalData.outAmount || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算数量:{{ totalData.endQty || '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 结算金额:{{ totalData.endAmount || '--' }}
         </span>
       </template>
     </s-table>
@@ -101,7 +101,9 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        targetName: undefined,
+        beginDate: '',
+        endDate: '',
+        date: [], // 日期
         code: '', //  产品编码
         name: '', //  产品名称
         origCode: '', //  原厂编码
@@ -112,34 +114,25 @@ export default {
       },
       labelCol: { span: 8 },
       wrapperCol: { span: 16 },
-      rules: {},
+      rules: {
+        'date': [{ required: true, message: '请选择日期', trigger: 'change' }]
+      },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       columns: [
         { title: '序号',
           dataIndex: 'no',
           width: 80,
-          align: 'center',
-          customRender: function (value, row, index) {
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') {
-              console.log(111)
-              obj.attrs.colSpan = 7
-            }
-            return obj
-          }
+          align: 'center'
           // fixed: 'left'
         },
         { title: '产品编码',
-          dataIndex: 'code',
+          dataIndex: 'productCode',
           width: 220,
           align: 'center',
-          customRender: function (value, row, index) {
-            value = value || '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.code ? row.productEntity.code : '--'
-            return obj
+          sorter: true,
+          customRender: function (text) {
+        	  return text || '--'
           }
         },
         { title: '产品名称',
@@ -147,11 +140,7 @@ export default {
           width: 220,
           align: 'center',
           customRender: function (value, row, index) {
-            value = value || '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.name ? row.productEntity.name : '--'
-            return obj
+        	  return row.productEntity && row.productEntity.name ? row.productEntity.name : '--'
           },
           ellipsis: true
         },
@@ -160,11 +149,7 @@ export default {
           align: 'center',
           width: 200,
           customRender: function (value, row, index) {
-            value = value || '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.productBrandName ? row.productEntity.productBrandName : '--'
-            return obj
+        	  return row.productEntity && row.productEntity.productBrandName ? row.productEntity.productBrandName : '--'
           }
         },
         { title: '三级分类',
@@ -172,11 +157,7 @@ export default {
           width: 150,
           align: 'center',
           customRender: function (value, row, index) {
-            value = value || '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.productTypeName3 ? row.productEntity.productTypeName3 : '--'
-            return obj
+        	  return row.productEntity && row.productEntity.productTypeName3 ? row.productEntity.productTypeName3 : '--'
           }
         },
         { title: '原厂编码',
@@ -184,11 +165,7 @@ export default {
           width: 220,
           align: 'center',
           customRender: function (value, row, index) {
-            value = value || '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.origCode ? row.productEntity.origCode : '--'
-            return obj
+        	  return row.productEntity && row.productEntity.origCode ? row.productEntity.origCode : '--'
           }
         },
         { title: '单位',
@@ -196,25 +173,21 @@ export default {
           width: 100,
           align: 'center',
           customRender: function (value, row, index) {
-            value = value || '--'
-            const obj = { children: value, attrs: {} }
-            if (value == '合计') { obj.attrs.colSpan = 0 }
-            obj.children = row.productEntity && row.productEntity.unit ? row.productEntity.unit : '--'
-            return obj
+        	  return row.productEntity && row.productEntity.unit ? row.productEntity.unit : '--'
           }
         },
-        { title: '期初数量', dataIndex: 'beginQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '期初数量', dataIndex: 'beginQty', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '期初单价(¥)', dataIndex: 'beginPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '期初金额(¥)', dataIndex: 'beginAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '收入数量', dataIndex: 'putQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '期初金额(¥)', dataIndex: 'beginAmount', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收入数量', dataIndex: 'putQty', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收入单价(¥)', dataIndex: 'putPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '收入金额(¥)', dataIndex: 'putAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '发出数量', dataIndex: 'outQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收入金额(¥)', dataIndex: 'putAmount', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '发出数量', dataIndex: 'outQty', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '发出单价(¥)', dataIndex: 'outPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '发出金额(¥)', dataIndex: 'outAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结存数量', dataIndex: 'endQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '发出金额(¥)', dataIndex: 'outAmount', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '结存数量', dataIndex: 'endQty', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '结存单价(¥)', dataIndex: 'endPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '结存金额(¥)', dataIndex: 'endAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '结存金额(¥)', dataIndex: 'endAmount', width: 100, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -244,7 +217,13 @@ export default {
           })
         } else {
           return new Promise(function (resolve, reject) {
-            resolve([])
+            const data = {
+			   pageNo: 1,
+			   pageSize: 10,
+			   list: [],
+			   count: 0
+            }
+            resolve(data)
           })
         }
       },
@@ -257,8 +236,9 @@ export default {
   methods: {
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0]
-      this.queryParam.endDate = date[1]
+      this.queryParam.date = date
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
     },
     //  查询
     handleSearch () {
@@ -300,7 +280,6 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.targetName = undefined
       this.queryParam.code = ''
       this.queryParam.name = ''
       this.queryParam.origCode = ''
@@ -309,7 +288,9 @@ export default {
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
       this.productType = []
-      this.$refs.table.refresh(true)
+      this.$refs.rangeDate.resetDate()
+      this.totalData = {}
+      this.$refs.table.clearTable()
     },
     //  产品分类  change
     changeProductType (val, opt) {