Просмотр исходного кода

Merge branch 'develop_temp0509' of jianguan-web/qpls-md-html into develop_xnyh02

李磊 3 лет назад
Родитель
Сommit
dd75a86e9b

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "1.1.4",
+    "version": "1.1.5",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 4 - 8
src/libs/JGPrint.js

@@ -151,23 +151,19 @@ export const jGPrint = function (data, type, printerType) {
     LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
     // LODOP.SET_PRINT_MODE('POS_BASEON_PAPER', true) // 可使输出以纸张边缘为基点
     if (type == 'preview') { //  预览
-      // blobToBaseByPdf(data,function(result){
-      //     LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', result.split('base64,')[1])
-      //     LODOP.SET_PRINT_PAGESIZE(3,2090,65,"");
-      //     LODOP.PREVIEW()
-      // })
-      if(data.data.length > 1){
+      const dlen = data.data.length
+      if(dlen > 1){
         LODOP.SET_SHOW_MODE("HIDE_PBUTTIN_PREVIEW",1);//隐藏打印按钮
       }
       LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data.data[0])
-      LODOP.SET_PRINT_PAGESIZE(3,2090,40,"");
+      LODOP.SET_PRINT_PAGESIZE(3,2090,dlen>1?0:50,"");
       LODOP.PREVIEW()
     } else if (type == 'print') { //  打印
       const dlen = data.data.length
       for(let i=0;i<dlen;i++){
         LODOP.PRINT_INIT("")
         LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data.data[i])
-        LODOP.SET_PRINT_PAGESIZE(3, 2090, 40, '')
+        LODOP.SET_PRINT_PAGESIZE(3, 2090, (i==dlen-1)?50:0, '')
         LODOP.PRINT()
       }
     }

+ 22 - 22
src/libs/getDate.js

@@ -12,8 +12,8 @@ export default {
       starttime: '',
       endtime: ''
     }
-    obj.starttime = moment(moment().startOf('day').valueOf()).format('YYYY-MM-DD')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    obj.starttime = moment(moment().startOf('day').valueOf()).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
   },
   // 获取今日的开始结束时间  年月日时分秒
@@ -32,8 +32,8 @@ export default {
       starttime: '',
       endtime: ''
     }
-    obj.starttime = moment().subtract('days', 6).format('YYYY-MM-DD')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    obj.starttime = moment().subtract('days', 6).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
   },
   //  近7天  年月日时分秒
@@ -52,8 +52,8 @@ export default {
       starttime: '',
       endtime: ''
     }
-    obj.starttime = moment().subtract('days', 2).format('YYYY-MM-DD')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    obj.starttime = moment().subtract('days', 2).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
   },
   // 获取昨日的开始结束时间
@@ -62,8 +62,8 @@ export default {
       starttime: '',
       endtime: ''
     }
-    obj.starttime = moment(moment().add(-1, 'days').startOf('day').valueOf()).format('YYYY-MM-DD')
-    obj.endtime = moment(moment().add(-1, 'days').endOf('day').valueOf()).format('YYYY-MM-DD')
+    obj.starttime = moment(moment().add(-1, 'days').startOf('day').valueOf()).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment(moment().add(-1, 'days').endOf('day').valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
   },
   // 获取当前周的开始到当天结束时间
@@ -72,8 +72,8 @@ export default {
       starttime: '',
       endtime: ''
     }
-    obj.starttime = moment(moment().week(moment().week()).startOf('week').add('days').valueOf()).format('YYYY-MM-DD')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    obj.starttime = moment(moment().week(moment().week()).startOf('week').add('days').valueOf()).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
   },
   // 获取上一周的开始结束时间
@@ -82,8 +82,8 @@ export default {
       starttime: '',
       endtime: ''
     }
-    obj.starttime = moment(moment().week(moment().week() - 1).startOf('week').add('days').valueOf()).format('YYYY-MM-DD')
-    obj.endtime = moment(moment().week(moment().week() - 1).endOf('week').add('days').valueOf()).format('YYYY-MM-DD')
+    obj.starttime = moment(moment().week(moment().week() - 1).startOf('week').add('days').valueOf()).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment(moment().week(moment().week() - 1).endOf('week').add('days').valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
   },
   // 获取上一月的今天到当月的今天
@@ -92,8 +92,8 @@ export default {
       starttime: '',
       endtime: ''
     }
-    obj.starttime = moment(moment().month(moment().month() - 1).valueOf()).format('YYYY-MM-DD')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    obj.starttime = moment(moment().month(moment().month() - 1).valueOf()).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
   },
   // 获取当前月的开始到当天结束时间
@@ -102,8 +102,8 @@ export default {
       starttime: '',
       endtime: ''
     }
-    obj.starttime = moment(moment().month(moment().month()).startOf('month').valueOf()).format('YYYY-MM-DD')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD')
+    obj.starttime = moment(moment().month(moment().month()).startOf('month').valueOf()).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
   },
   // 获取上一个月的开始结束时间
@@ -112,8 +112,8 @@ export default {
       starttime: '',
       endtime: ''
     }
-    obj.starttime = moment(moment().month(moment().month() - 1).startOf('month').valueOf()).format('YYYY-MM-DD')
-    obj.endtime = moment(moment().month(moment().month() - 1).endOf('month').valueOf()).format('YYYY-MM-DD')
+    obj.starttime = moment(moment().month(moment().month() - 1).startOf('month').valueOf()).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment(moment().month(moment().month() - 1).endOf('month').valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
   },
   // 获取三月前的今天到当月的今天
@@ -122,8 +122,8 @@ export default {
       starttime: '',
       endtime: ''
     }
-    obj.starttime = moment(moment().month(moment().month() - 3).valueOf()).format('YYYY-MM-DD')
-    obj.endtime = moment(moment().month(moment().month() - 3).endOf('month').valueOf()).format('YYYY-MM-DD')
+    obj.starttime = moment(moment().month(moment().month() - 3).valueOf()).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment(moment().month(moment().month() - 3).endOf('month').valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
   },
   // 获取近三个月的开始结束时间
@@ -132,8 +132,8 @@ export default {
       starttime: '',
       endtime: ''
     }
-    obj.starttime = moment(moment().month(moment().month() - 2).startOf('month').valueOf()).format('YYYY-MM-DD')
-    obj.endtime = moment(moment().month(moment().month() - 2).endOf('month').valueOf()).format('YYYY-MM-DD')
+    obj.starttime = moment(moment().month(moment().month() - 2).startOf('month').valueOf()).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment(moment().month(moment().month() - 2).endOf('month').valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
   }
 }

+ 4 - 2
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -407,7 +407,9 @@ export default {
           onOk () {
             _this.paramsData = {
               supplierName: _this.basicInfoData.supplierName,
-              code: _this.queryParam.queryWord,
+              code: _this.queryParam.code,
+              name: _this.queryParam.name,
+              origCode: _this.queryParam.origCode,
               putCost: 0,
               putQty: 1,
               warehouse: []
@@ -432,7 +434,7 @@ export default {
     // 添加产品成功
     saveProductOk (data) {
       this.paramsData = data
-      this.queryParam.queryWord = data.code
+      this.queryParam.code = data.code
       this.$refs.table.refresh(true)
     },
     //  重置

+ 1 - 1
src/views/common/productBrand.js

@@ -24,7 +24,7 @@ const ProductBrand = {
       default: ''
     },
     sysFlag: {
-      type: String,
+      type: [String,Number],
       default: '1'
     }
   },

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

@@ -22,6 +22,10 @@ export default {
     size: {
       type: String,
       default: 'default'
+    },
+    showTime: {
+      type: Boolean,
+      default: true
     }
   },
   data () {
@@ -55,6 +59,11 @@ export default {
       this.date = date
       if (dateStrings[0] == '' && dateStrings[1] == '') {
         dateStrings = []
+      } else {
+        if (this.showTime) {
+          dateStrings[0] = dateStrings[0] + ' 00:00:00'
+          dateStrings[1] = dateStrings[1] + ' 23:59:59'
+        }
       }
       this.$emit('change', dateStrings)
     },

+ 2 - 2
src/views/customerManagement/customerInfo/list.vue

@@ -187,8 +187,8 @@ export default {
   methods: {
     //  时间  change
     dateSaleChange (date) {
-      this.queryParam.saleBeginDate = date[0] ? date[0] + ' 00:00:00' : ''
-      this.queryParam.saleEndDate = date[1] ? date[1] + ' 23:59:59' : ''
+      this.queryParam.saleBeginDate = date[0] ? date[0] : ''
+      this.queryParam.saleEndDate = date[1] ? date[1] : ''
     },
     //  重置
     resetSearchForm () {

+ 2 - 2
src/views/financialManagement/fundAccountManagement/detail.vue

@@ -152,8 +152,8 @@ export default {
     //  时间  change
     dateChange (date) {
       if (date.length) {
-        this.queryParam.beginDate = date[0] + ' 00:00:00'
-        this.queryParam.endDate = date[1] + ' 00:00:00'
+        this.queryParam.beginDate = date[0]
+        this.queryParam.endDate = date[1]
       } else {
         this.queryParam.beginDate = ''
         this.queryParam.endDate = ''

+ 6 - 6
src/views/financialManagement/ledgerRecord/list.vue

@@ -91,8 +91,8 @@ export default {
           name: '',
           code: ''
         },
-        beginDate: getDate.getRecentday().starttime + ' 00:00:00',
-        endDate: getDate.getRecentday().endtime + ' 23:59:59'
+        beginDate: getDate.getRecentday().starttime,
+        endDate: getDate.getRecentday().endtime
       },
       // 表头
       columns: [
@@ -134,8 +134,8 @@ export default {
   methods: {
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0] ? date[0] + ' 00:00:00' : ''
-      this.queryParam.endDate = date[1] ? date[1] + ' 23:59:59' : ''
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
     },
     // 合计
     getTotal (params) {
@@ -153,8 +153,8 @@ export default {
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate(this.createDate)
-      this.queryParam.beginDate = getDate.getRecentday().starttime + ' 00:00:00'
-      this.queryParam.endDate = getDate.getRecentday().endtime + ' 23:59:59'
+      this.queryParam.beginDate = getDate.getRecentday().starttime
+      this.queryParam.endDate = getDate.getRecentday().endtime
       this.queryParam.customer.customerSn = undefined
       this.queryParam.dealerProduct.name = ''
       this.queryParam.dealerProduct.code = ''

+ 8 - 8
src/views/financialManagement/warehousingAudit/list.vue

@@ -116,14 +116,14 @@ export default {
       advanced: true, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       auditTime: [
-        moment(getDate.getThreeMonthDays().starttime + ' 00:00:00', 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime + ' 23:59:59', 'YYYY-MM-DD')
+        getDate.getThreeMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
       ], //  入库时间
       tableHeight: 0,
       // 查询参数
       queryParam: {
-        beginDate: getDate.getThreeMonthDays().starttime + ' 00:00:00',
-        endDate: getDate.getCurrMonthDays().endtime + ' 23:59:59',
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         purchaseBillNo: '',
         receivingBillNo: '',
         auditState: 'WAIT_PUT_WAREHOUSE_AUDIT'
@@ -175,8 +175,8 @@ export default {
   methods: {
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0] ? date[0] + ' 00:00:00' : ''
-      this.queryParam.endDate = date[1] ? date[1] + ' 23:59:59' : ''
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
     },
     // 合计
     getTotal (param) {
@@ -223,8 +223,8 @@ export default {
     // 重置数据
     resetData (flag) {
       this.$refs.rangeDate.resetDate(flag ? '' : this.auditTime)
-      this.queryParam.beginDate = flag ? '' : (getDate.getThreeMonthDays().starttime + ' 00:00:00')
-      this.queryParam.endDate = flag ? '' : (getDate.getCurrMonthDays().endtime + ' 23:59:59')
+      this.queryParam.beginDate = flag ? '' : (getDate.getThreeMonthDays().starttime)
+      this.queryParam.endDate = flag ? '' : (getDate.getCurrMonthDays().endtime)
       this.queryParam.purchaseBillNo = ''
       this.queryParam.receivingBillNo = ''
       this.queryParam.auditState = flag ? '' : 'WAIT_PUT_WAREHOUSE_AUDIT'

+ 2 - 2
src/views/notice/list.vue

@@ -105,8 +105,8 @@ export default {
     ]),
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0] ? date[0] + ' 00:00:00' : ''
-      this.queryParam.endDate = date[1] ? date[1] + ' 23:59:59' : ''
+      this.queryParam.beginDate = date[0] ? date[0]: ''
+      this.queryParam.endDate = date[1] ? date[1]: ''
     },
     // 查询列表
     handelSearch (pageNo) {

+ 0 - 1
src/views/numsGoodsShelves/settlementManagement/settlementDetail.vue

@@ -38,7 +38,6 @@
           ref="table"
           size="small"
           rowKey="id"
-          :showPagination="false"
           :columns="columns"
           :data="loadData"
           :defaultLoadData="false"

+ 0 - 1
src/views/numsGoodsShelves/settlementManagement/unSettlementDetail.vue

@@ -75,7 +75,6 @@
           ref="table"
           size="small"
           rowKey="id"
-          :showPagination="false"
           :columns="columns"
           :data="loadData"
           :defaultLoadData="false"

+ 2 - 2
src/views/numsGoodsShelves/shelfMonitoring/warehouseDetail.vue

@@ -144,8 +144,8 @@ export default {
     },
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0] ? date[0] + ' 00:00:00' : null
-      this.queryParam.endDate = date[1] ? date[1] + ' 23:59:59' : null
+      this.queryParam.beginDate = date[0] ? date[0] : null
+      this.queryParam.endDate = date[1] ? date[1] : null
     }
   },
   mounted () {

+ 4 - 2
src/views/productManagement/newProduct/modal.vue

@@ -80,13 +80,15 @@ export default {
     }
   },
   mounted () {
-    this.$refs.table.refresh(true)
+    this.$nextTick(() => {
+      this.$refs.table.refresh(true)
+    })
   },
   watch: {
     onlineFalg (newValue, oldValue) {
       const _this = this
       setTimeout(() => {
-        _this.$refs.table.refresh(true)
+        _this.$refs.table && _this.$refs.table.refresh(true)
       }, 400)
     }
   }

+ 1 - 1
src/views/productManagement/productBrand/editModal.vue

@@ -107,7 +107,7 @@ export default {
           dealerProductBrandSave(formData).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
-              _this.$emit('ok')
+              _this.$emit('ok', formData.brandName)
               _this.isShow = false
               _this.spinning = false
             } else {

+ 40 - 50
src/views/productManagement/productInfo/edit.vue

@@ -50,7 +50,7 @@
           <a-form-model-item label="基本单位" prop="unit">
             <a-input-group compact>
               <a-input
-                style="width: 80%"
+                style="width: 70%"
                 v-model.trim="form.unit"
                 id="productInfoEdit-unit-input"
                 placeholder="请输入基本单位"
@@ -58,7 +58,7 @@
                 @keydown.enter.native="nextFocus('unit', 'UNIT', $event, 'vSelect')"
                 allowClear/>
               <v-select
-                style="width: 20%"
+                style="width: 30%"
                 code="UNIT"
                 @change="unitChange"
                 id="productInfoEdit-unit"
@@ -69,14 +69,14 @@
           </a-form-model-item>
           <a-form-model-item label="产品品牌" prop="productBrandSn">
             <a-select
-              show-search
+              :showSearch="true"
               id="productInfoEdit-productBrand"
               v-model="form.productBrandSn"
-              placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增"
+              placeholder="请输入名称搜索,如果没有请点击 '+' 新增"
               :disabled="isEdit"
-              :filter-option="false"
-              :not-found-content="fetching ? undefined : null"
-              @search="fetchUser"
+              :filter-option="filterOption"
+              option-filter-prop="children"
+              allowClear
               style="width: 90%;"
               ref="productBrandSn"
               @keydown.enter.native="nextFocus('productBrandSn', 'productType', $event)"
@@ -294,25 +294,31 @@ export default {
       this.$refs.ruleForm.clearValidate('warehouse')
     },
     // 搜索品牌
-    fetchUser (value) {
+    searchBrand (value, defval) {
       console.log('fetching user', value)
       this.fetching = true
       dealerProductBrandQuery({ 'queryWord': value }).then(res => {
         if (res.status == 200) {
           this.productBrandList = res.data || []
           this.fetching = false
+          // 默认值
+          if (defval) {
+            const row = this.productBrandList.find(item => item.brandName == defval)
+            this.form.productBrandSn = row.brandSn
+            this.$refs.ruleForm.clearValidate('productBrandSn')
+          }
         } else {
           this.productBrandList = []
           this.fetching = false
         }
       })
     },
-    filterEmpty () {
-      let str = this.form.name
-      str = str.replace(/\ +/g, '')
-      str = str.replace(/[ ]/g, '')
-      str = str.replace(/[\r\n]/g, '')
-      this.form.name = str
+    filterOption (input, option) {
+      console.log(input, option.data.attrs.pinyin)
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+        option.data.attrs.pinyin && option.data.attrs.pinyin.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
     },
     // 选择单位
     unitChange (a, b) {
@@ -328,7 +334,7 @@ export default {
           const productTypeSn3 = res.data.productTypeSn3 ? res.data.productTypeSn3 : ''
           this.form.productType = [productTypeSn1, productTypeSn2, productTypeSn3]
           if (res.data.productBrandName) {
-            this.fetchUser(res.data.productBrandName)
+            this.searchBrand(res.data.productBrandName)
           }
         } else {
           this.$refs.ruleForm.resetFields()
@@ -392,14 +398,10 @@ export default {
       this.form.productTypeSn3 = val[2] ? val[2] : ''
     },
     //  新增品牌  成功
-    handleOk () {
-      //  获取品牌数据列表,并赋值
-      this.getProductBrand('val')
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
+    handleOk (val) {
+      if (val) { //  需将新增加的品牌回填到产品品牌的地方,即不需要用户再选一下
+        this.searchBrand('', val)
+      }
     },
     //  返回
     handleBack () {
@@ -409,18 +411,6 @@ export default {
         this.$emit('cansel')
       }
     },
-    //  产品品牌  列表
-    getProductBrand (val) {
-      dealerProductBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-          if (val) { //  需将新增加的品牌回填到产品品牌的地方,即不需要用户再选一下
-            this.form.productBrandSn = this.productBrandList[0].brandSn
-            this.$refs.ruleForm.clearValidate('productBrandSn')
-          }
-        }
-      })
-    },
     //  产品分类  列表
     getProductType () {
       dealerProductTypeList({}).then(res => {
@@ -432,25 +422,25 @@ export default {
       })
     },
     pageInit () {
-      this.getProductType()
       this.$refs.ruleForm.resetFields()
-      // 默认首项获取焦点
-      const _this = this
-      setTimeout(() => {
-        if (_this.$refs['name']) {
-          _this.$refs['name'].focus()
-        }
-      }, 300)
-      if (this.$route.params.id) { //  编辑页
+      this.getProductType()
+      this.searchBrand('')
+
+      //  编辑页
+      if (this.$route.params.id && this.pageType == 'pages') {
         this.getGoodsDetail()
       }
-      // 如果是其它页面新建产品
-      if (this.pageType == 'modal') {
-        this.form = Object.assign(this.form, this.formData)
-        this.$nextTick(() => {
+
+      this.$nextTick(() => {
+        // 默认首项获取焦点
+        this.$refs['name'].focus()
+        // 如果是其它页面新建产品
+        if (this.pageType == 'modal') {
+          console.log(this.paramsData)
+          this.form = Object.assign(this.form, this.paramsData)
           this.$refs.warehouse.setDefaultVal()
-        })
-      }
+        }
+      })
     }
   },
   mounted () {

+ 6 - 6
src/views/purchasingManagement/signWarehousing/list.vue

@@ -107,12 +107,12 @@ export default {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       time: [
-        getDate.getCurrMonthDays().starttime + ' 00:00:00',
-        getDate.getCurrMonthDays().endtime + ' 23:59:59'
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
       ],
       queryParam: { //  查询条件
-        beginDate: getDate.getCurrMonthDays().starttime + ' 00:00:00',
-        endDate: getDate.getCurrMonthDays().endtime + ' 23:59:59',
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         purchaseBillNo: '', //  采购单号
         sendBillNo: '', //  发货单号
         auditState: undefined
@@ -158,8 +158,8 @@ export default {
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime + ' 00:00:00'
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime + ' 23:59:59'
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.purchaseBillNo = ''
       this.queryParam.sendBillNo = ''
       this.queryParam.auditState = undefined

+ 9 - 5
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -365,10 +365,12 @@ export default {
       })
     },
     // 获取单据详细
-    getOrderDetail () {
+    getOrderDetail (flag) {
       salesReturnDetail({ sn: this.orderSn }).then(res => {
         this.ordeDetail = res.data || null
-        this.$refs.queryPart.pageInit(this.buyerSn, this.ordeDetail && this.ordeDetail.priceType || '')
+        if (!flag) {
+          this.$refs.queryPart.pageInit(this.buyerSn, this.ordeDetail && this.ordeDetail.priceType || '')
+        }
       })
     },
     // 打折
@@ -383,7 +385,7 @@ export default {
         id: this.ordeDetail.id
       }).then(res => {
         if (res.status == 200) {
-          this.resetSearchForm()
+          this.getOrderDetail(true)
           this.spinning = false
         } else {
           this.spinning = false
@@ -437,7 +439,9 @@ export default {
     //  重置
     resetSearchForm (flag) {
       this.$refs.table.refresh(!!flag)
-      // this.getOrderDetail()
+      if (flag) {
+        this.getOrderDetail()
+      }
     },
     // 添加或修改产品
     saveProduct (row, type) {
@@ -474,7 +478,7 @@ export default {
       }
       this.spinning = true
       salesReturnSaveProduct(params).then(res => {
-        this.resetSearchForm(type != 'edit')
+        this.resetSearchForm(type == 'edit')
         this.isInster = false
         this.spinning = false
       })

+ 11 - 7
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -351,10 +351,12 @@ export default {
       })
     },
     // 获取单据详细
-    getOrderDetail () {
+    getOrderDetail (flag) {
       salesReturnDetail({ sn: this.orderSn }).then(res => {
         this.ordeDetail = res.data || null
-        this.$refs.queryPart.pageInit(this.buyerSn, this.ordeDetail && this.ordeDetail.priceType || '')
+        if (!flag) {
+          this.$refs.queryPart.pageInit(this.buyerSn, this.ordeDetail && this.ordeDetail.priceType || '')
+        }
       })
     },
     // 打折
@@ -369,7 +371,7 @@ export default {
         id: this.ordeDetail.id
       }).then(res => {
         if (res.status == 200) {
-          this.resetSearchForm()
+          this.getOrderDetail(true)
           this.spinning = false
         } else {
           this.spinning = false
@@ -389,7 +391,7 @@ export default {
           _this.spinning = true
           salesReturnDelAll({ sn: _this.ordeDetail.salesReturnSn }).then(res => {
             if (res.status == 200) {
-              _this.resetSearchForm()
+              _this.resetSearchForm(true)
               _this.$refs.queryPart.resetSearchForm()
             }
             _this.$message.info(res.message)
@@ -423,8 +425,10 @@ export default {
     },
     //  重置
     resetSearchForm (flag) {
-      this.$refs.table.refresh(!!flag)
-      // this.getOrderDetail()
+      this.$refs.table.refresh(flag)
+      if (flag) {
+        this.getOrderDetail()
+      }
     },
     // 添加或修改产品
     saveProduct (row, type) {
@@ -458,7 +462,7 @@ export default {
       }
       this.spinning = true
       salesReturnSaveProduct(params).then(res => {
-        this.resetSearchForm(type != 'edit')
+        this.resetSearchForm(type == 'edit')
         this.isInster = false
         this.spinning = false
       })

+ 6 - 6
vue.config.js

@@ -35,7 +35,7 @@ const assetsCDN = {
     '//vuepkg.oss-cn-beijing.aliyuncs.com/vue-router.min.js',
     '//vuepkg.oss-cn-beijing.aliyuncs.com/vuex.min.js',
     '//vuepkg.oss-cn-beijing.aliyuncs.com/axios.min.js',
-    '//vuepkg.oss-cn-beijing.aliyuncs.com/lodash.min.js',
+    // '//vuepkg.oss-cn-beijing.aliyuncs.com/lodash.min.js',
     '//vuepkg.oss-cn-beijing.aliyuncs.com/echarts.min.js'
   ]
 }
@@ -47,11 +47,11 @@ const prodExternals = {
   vuex: 'Vuex',
   axios: 'axios',
   echarts: 'echarts',
-  lodash : { 
-    commonjs: "lodash",
-    amd: "lodash",
-    root: "_" // indicates global variable
-  },
+  // lodash : { 
+  //   commonjs: "lodash",
+  //   amd: "lodash",
+  //   root: "_" // indicates global variable
+  // },
   'mockjs2': 'Mock'
 }