Commit 594080ee60b0c811dd26989448c1b03a78a25ea9

Authored by 谭毅彬
1 parent c17dcbf0

库位比较功能支持比较所有库位任务

Signed-off-by: TanYibin <5491541@qq.com>
ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocationTask.vue
... ... @@ -109,16 +109,40 @@ export default {
109 109 required: false
110 110 }
111 111 },
  112 +
112 113 watch: {
113 114 mainId: {
114 115 immediate: true,
115 116 handler(val) {
  117 + var nowDate = new Date()
  118 + this.queryParam['taskCreateTimeBegin'] = new Date(nowDate.getTime() - 90 * 24 * 60 * 60 * 1000).format('yyyy-MM-dd hh:mm:ss')
  119 + this.queryParam['taskCreateTimeEnd'] = nowDate.format('yyyy-MM-dd hh:mm:ss')
116 120 this.queryParam['locationCode'] = val
117 121 this.loadData(1)
118 122 }
119 123 }
120 124 },
121 125 data() {
  126 + Date.prototype.format = function(fmt) {
  127 + var o = {
  128 + 'M+': this.getMonth() + 1, //月份
  129 + 'd+': this.getDate(), //日
  130 + 'h+': this.getHours(), //小时
  131 + 'm+': this.getMinutes(), //分
  132 + 's+': this.getSeconds(), //秒
  133 + 'q+': Math.floor((this.getMonth() + 3) / 3), //季度
  134 + S: this.getMilliseconds() //毫秒
  135 + }
  136 + if (/(y+)/.test(fmt)) {
  137 + fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
  138 + }
  139 + for (var k in o) {
  140 + if (new RegExp('(' + k + ')').test(fmt)) {
  141 + fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length))
  142 + }
  143 + }
  144 + return fmt
  145 + }
122 146 return {
123 147 description: '库位任务信息比较页面',
124 148 disableMixinCreated: true,
... ... @@ -217,9 +241,6 @@ export default {
217 241 },
218 242 created() {
219 243 this.initDictData()
220   - var nowDate = new Date()
221   - this.queryParam['taskCreateTimeBegin'] = new Date(nowDate.getTime() - 90 * 24 * 60 * 60 * 1000)
222   - this.queryParam['taskCreateTimeEnd'] = nowDate
223 244 },
224 245 methods: {
225 246 initDictData() {
... ...