Browse Source

Merge branch 'develop_yh40' of jianguan-web/qpls-md-html into pre-release

李磊 1 year ago
parent
commit
3890e134fd

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1716257856508
+  "version": 1717384672649
 }

+ 9 - 3
src/components/Table/index.js

@@ -10,6 +10,8 @@ export default {
       localLoading: false,
       localDataSource: [],
       localPagination: Object.assign({}, this.pagination),
+      localSorter: null,
+      localFilter: null,
       isSucceed: true ,//  是否请求成功
       leftAlignId:"",
     }
@@ -133,6 +135,7 @@ export default {
       showSizeChanger: this.showSizeChanger
     }) || false
     this.needTotalList = this.initTotalList(this.columns)
+    this.localSorter = null
     if (this.defaultLoadData) {
       this.loadData()
     }
@@ -147,7 +150,8 @@ export default {
       bool && (this.localPagination = Object.assign({}, {
         current: 1, pageSize: this.localPagination.pageSize
       }))
-      this.loadData()
+      console.log(this.localSorter)
+      this.loadData(null,null,this.localSorter)
     },
     // 重置表格为空
     clearTable () {
@@ -166,6 +170,7 @@ export default {
      * @param {Object} sorter 排序条件
      */
     loadData (pagination, filters, sorter) {
+      console.log(sorter)
       this.localLoading = true
       const parameter = Object.assign({
         pageNo: (pagination && pagination.current) ||
@@ -177,13 +182,14 @@ export default {
       },
       (sorter && sorter.field && {
         sortField: sorter.field
-      }) || {},
+      }) || this.localSorter && {sortField: this.localSorter.field},
       (sorter && sorter.order && {
         sortOrder: sorter.order
-      }) || {}, {
+      }) || this.localSorter && {sortOrder: this.localSorter.order}, {
         ...filters
       }
       )
+      this.localSorter = sorter
       // console.log('parameter', parameter)
       const result = this.data(parameter)
       // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.count, r.data

+ 17 - 11
src/views/productManagement/productInfo/edit.vue

@@ -129,12 +129,12 @@
               :max="999999"
               :precision="2"
               style="width: 90%;margin-right: 5px;"
-              placeholder="请输入经销批发价(1~999999)"
+              placeholder="请输入经销批发价(0~999999)"
               ref="specialPrice"
-              @keydown.enter.native="nextFocus('specialPrice', 'cost', $event)"
+              @keydown.enter.native="nextFocus('specialPrice', 'terminalPrice', $event)"
               allowClear /><span>元</span>
           </a-form-model-item>
-         <!-- <a-form-model-item label="成本价" v-if="pageType=='pages'" prop="cost">
+          <!-- <a-form-model-item label="成本价" v-if="pageType=='pages'" prop="cost">
             <a-input-number
               id="productInfoEdit-cost"
               v-model="form.cost"
@@ -142,7 +142,7 @@
               :max="999999"
               :precision="2"
               style="width: 90%;margin-right: 5px;"
-              placeholder="请输入成本价(1~999999)"
+              placeholder="请输入成本价(0~999999)"
               ref="cost"
               @keydown.enter.native="nextFocus('cost', 'terminalPrice', $event)"
               allowClear /><span>元</span>
@@ -155,7 +155,7 @@
               :max="999999"
               :precision="2"
               style="width: 90%;margin-right: 5px;"
-              placeholder="请输入终端价(1~999999)"
+              placeholder="请输入终端价(0~999999)"
               ref="terminalPrice"
               @keydown.enter.native="nextFocus('terminalPrice', 'carOwnersPrice', $event)"
               allowClear /><span>元</span>
@@ -168,7 +168,7 @@
               :max="999999"
               :precision="2"
               style="width: 90%;margin-right: 5px;"
-              placeholder="请输入车主价(1~999999)"
+              placeholder="请输入车主价(0~999999)"
               ref="carOwnersPrice"
               @keydown.enter.native="nextFocus('carOwnersPrice', '', $event)"
               allowClear /><span>元</span>
@@ -188,7 +188,7 @@
           </a-form-model-item>
           <a-form-model-item label="入库数量" v-if="pageType=='modal'" prop="putQty">
             <a-input-number
-              id="productInfoEdit-specialPrice"
+              id="productInfoEdit-putQty"
               v-model="form.putQty"
               :precision="0"
               :min="1"
@@ -276,7 +276,7 @@ export default {
         name: '', // 产品名称
         code: '', //  产品编码
         origCode: '', //  原厂编码
-        qrCode:'', // 条形码
+        qrCode: '', // 条形码
         unit: '', //  基本单位
         productBrandSn: undefined, //  产品品牌
         productTypeSn3: '', //  产品三级分类
@@ -301,9 +301,15 @@ export default {
         productType: [
           { required: true, message: '请选择产品分类', trigger: 'change' }
         ],
-        putCost: [
-          { required: true, type: 'number', message: '请输入成本价', trigger: 'change' }
-        ],
+        // specialPrice: [
+        //   { required: true, type: 'number', message: '请输入经销批发价', trigger: 'change' }
+        // ],
+        // terminalPrice: [
+        //   { required: true, type: 'number', message: '请输入终端价', trigger: 'change' }
+        // ],
+        // carOwnersPrice: [
+        //   { required: true, type: 'number', message: '请输入车主价', trigger: 'change' }
+        // ],
         putQty: [
           { required: true, type: 'number', message: '请输入数量', trigger: 'change' }
         ],

+ 12 - 12
src/views/reportData/receivedSendStorageReport/list.vue

@@ -16,7 +16,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="日期" prop="time">
-                <rangeDate ref="rangeDate" :showShortcut="false" :value="queryParam.time" @change="dateChange" />
+                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -74,9 +74,7 @@
         bordered>
         <template slot="footer">
           <span>
-            合计: 期初数量:{{ (totalData && (totalData.beginQty || totalData.beginQty==0)) ? totalData.beginQty : '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            期初金额:{{ (totalData && (totalData.beginAmount || totalData.beginAmount==0)) ? toThousands(totalData.beginAmount) : '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            收入数量:{{ (totalData && (totalData.putQty || totalData.putQty==0)) ? totalData.putQty : '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            合计:收入数量:{{ (totalData && (totalData.putQty || totalData.putQty==0)) ? totalData.putQty : '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             收入金额:{{ (totalData && (totalData.putAmount || totalData.putAmount==0)) ? toThousands(totalData.putAmount) : '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             发出数量:{{ (totalData && (totalData.outQty || totalData.outQty==0)) ? totalData.outQty : '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
             发出金额:{{ (totalData && (totalData.outAmount || totalData.outAmount==0)) ? toThousands(totalData.outAmount) : '--' }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
@@ -115,8 +113,8 @@ export default {
         ],
         // beginDate: getDate.getMonthDays(3).starttime,
         // endDate: getDate.getMonthDays(3).endtime,
-        beginDate:'',
-        endDate:'',
+        beginDate: '',
+        endDate: '',
         productEntity: {
           code: '', //  产品编码
           name: '', //  产品名称
@@ -129,7 +127,7 @@ export default {
       labelCol: { span: 8 },
       wrapperCol: { span: 16 },
       rules: {
-        'time': [{ required: true, message: '请选择日期(最多查看三个月)', trigger: 'change' }]
+        'time': [{ required: true, message: '请选择日期(最多查看一年)', trigger: 'change' }]
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -141,9 +139,9 @@ export default {
         { title: '三级分类', dataIndex: 'productEntity.productTypeName3', width: 130, align: 'left', customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 120, align: 'left', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '期初数量', dataIndex: 'beginQty', width: 80, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '期初单价(¥)', dataIndex: 'beginPrice', width: 100, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '期初金额(¥)', dataIndex: 'beginAmount', width: 100, align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        // { title: '期初数量', dataIndex: 'beginQty', width: 80, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // { title: '期初单价(¥)', dataIndex: 'beginPrice', width: 100, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        // { title: '期初金额(¥)', dataIndex: 'beginAmount', width: 100, align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '收入数量', dataIndex: 'putQty', width: 80, align: 'center', sorter: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收入单价(¥)', dataIndex: 'putPrice', width: 100, align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '收入金额(¥)', dataIndex: 'putAmount', width: 100, align: 'right', sorter: true, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
@@ -157,6 +155,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        console.log('loadData.parameter:', parameter)
         const params = Object.assign(parameter, this.queryParam)
         this.spinning = true
         if (this.queryParam.beginDate) {
@@ -208,8 +207,8 @@ export default {
         if (valid) {
           const a = moment(this.queryParam.beginDate)
           const b = moment(this.queryParam.endDate).subtract(1, 'days')
-          if (b.diff(a, 'month') > 2) {
-            this.$message.info('最多只能查询3个月')
+          if (b.diff(a, 'days') > 365) {
+            this.$message.info('最多只能查询一年')
             return false
           }
           this.$refs.table.refresh(true)
@@ -245,6 +244,7 @@ export default {
       this.queryParam.productEntity.productTypeSn3 = ''
       this.productType = []
       this.totalData = null
+
       this.$refs.table.clearTable()
       this.$refs.ruleForm.resetFields()
     },