Merge remote-tracking branch 'origin/master_1' into one_rebuild_dev
# Conflicts: # lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java # lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/OutServiceImpl.java
This commit is contained in:
@@ -142,7 +142,7 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="username" label="用户名" :min-width="flexWidth('username',crud.data,'用户名')" />
|
||||
<el-table-column
|
||||
prop="person_name"
|
||||
@@ -260,7 +260,7 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="getRows"
|
||||
>
|
||||
<el-table-column :selectable="checkboxT" type="selection" width="55" />
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="label" label="权限范围" />
|
||||
<el-table-column label="数据权限">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -94,8 +94,8 @@
|
||||
<el-table-column prop="type" label="类别" />
|
||||
<el-table-column prop="size" label="大小" />
|
||||
<el-table-column prop="operate" label="操作人" />
|
||||
<el-table-column prop="createTime" label="创建日期" />
|
||||
<el-table-column prop="updateTime" label="修改日期" />
|
||||
<el-table-column prop="create_time" label="创建日期" />
|
||||
<el-table-column prop="update_time" label="修改日期" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
v-model="query.package_box_sn"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="物料编码、名称或规格"
|
||||
placeholder="木箱码"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
@@ -112,6 +112,7 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
@@ -203,6 +204,7 @@
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出Excel
|
||||
@@ -250,7 +252,6 @@
|
||||
label="物料名称"
|
||||
:min-width="flexWidth('material_name',crud.data,'物料名称')"
|
||||
/>
|
||||
<!-- <el-table-column prop="region_name" label="下料区域" min-width="120" show-overflow-tooltip />-->
|
||||
<el-table-column
|
||||
prop="package_box_sn"
|
||||
label="木箱码"
|
||||
@@ -263,6 +264,7 @@
|
||||
/>
|
||||
<el-table-column prop="pcsn" label="子卷号" :min-width="flexWidth('pcsn',crud.data,'子卷号')" />
|
||||
<el-table-column prop="sap_pcsn" label="sap批次" :min-width="flexWidth('sap_pcsn',crud.data,'sap批次')" />
|
||||
<el-table-column prop="sale_order_name" label="销售订单" :min-width="flexWidth('sale_order_name',crud.data,'销售订单')" />
|
||||
<el-table-column prop="box_weight" label="毛重" :formatter="rounding2" />
|
||||
<el-table-column prop="canuse_qty" label="可用数" :formatter="rounding" />
|
||||
<el-table-column prop="frozen_qty" label="冻结数" :formatter="rounding" />
|
||||
@@ -274,17 +276,11 @@
|
||||
<el-table-column prop="joint_type" label="接头数" min-width="150" />
|
||||
<el-table-column prop="sub_type" label="子卷状态" min-width="150" :formatter="formatSubType" />
|
||||
<el-table-column prop="produce_age" label="生产时长(天)" min-width="120" />
|
||||
<!-- <el-table-column prop="quality_scode" label="品质类型" min-width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.ST_QUALITY_SCODE[scope.row.quality_scode] }}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column prop="paper_type" label="品质类型" min-width="150" />
|
||||
<el-table-column prop="paper_code" label="管件编码" min-width="150" />
|
||||
<el-table-column prop="paper_name" label="管件描述" min-width="250" />
|
||||
<el-table-column prop="remark" label="超期原因" min-width="250">
|
||||
<template scope="scope">
|
||||
<!-- <el-input v-model="scope.row.remark" style="width: 200px" />-->
|
||||
<el-select
|
||||
v-model="scope.row.remark"
|
||||
clearable
|
||||
@@ -323,46 +319,27 @@
|
||||
|
||||
<script>
|
||||
import crudStructivt from '@/views/wms/basedata/st/ivt/structivt'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import UploadDialog from '@/views/wms/basedata/st/ivt/UploadDialog'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
const defaultForm = {
|
||||
stockrecord_id: null,
|
||||
cascader: null,
|
||||
struct_id: null,
|
||||
struct_code: null,
|
||||
struct_name: null,
|
||||
workprocedure_id: null,
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
quality_scode: null,
|
||||
pcsn: null,
|
||||
canuse_qty: null,
|
||||
frozen_qty: null,
|
||||
ivt_qty: null,
|
||||
warehousing_qty: null,
|
||||
qty_unit_id: null,
|
||||
instorage_time: null,
|
||||
sale_id: null
|
||||
}
|
||||
export default {
|
||||
name: 'Structivt',
|
||||
dicts: ['ST_QUALITY_SCODE', 'product_area', 'IS_OR_NOT', 'SUB_TYPE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, UploadDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
components: { pagination, crudOperation, rrOperation, UploadDialog },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '库存管理', url: 'api/structivt', idField: 'stockrecord_id', sort: 'stockrecord_id,desc',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
showDtlLoading: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
@@ -422,7 +399,6 @@ export default {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
console.log(value)
|
||||
this.crud.toQuery()
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
@@ -445,12 +421,12 @@ export default {
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
this.showDtlLoading = true
|
||||
download('/api/structivt/download', this.crud.query).then(result => {
|
||||
downloadFile(result, '成品库存', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
this.showDtlLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
this.showDtlLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -87,16 +87,6 @@
|
||||
@change="hand"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期">
|
||||
<el-date-picker
|
||||
v-model="query.date_of_FG_inbound"
|
||||
type="date"
|
||||
placeholder="选择日期时间"
|
||||
style="width: 185px"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="hand"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
@@ -159,23 +149,17 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="满轴位状态">
|
||||
<el-select
|
||||
v-model="query.full_point_status"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="hand"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.sch_full_point_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="业务日期" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -187,6 +171,7 @@
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出Excel
|
||||
@@ -610,6 +595,7 @@ import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
import crudUserStor from "@/views/wms/basedata/st/userStor/userStor";
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
@@ -669,6 +655,7 @@ export default {
|
||||
edit: ['admin', 'sub:edit'],
|
||||
del: ['admin', 'sub:del']
|
||||
},
|
||||
showDtlLoading: false,
|
||||
isPlanProducList: [
|
||||
{ 'label': '是', 'value': '1' },
|
||||
{ 'label': '否', 'value': '0' }
|
||||
@@ -744,23 +731,53 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initQuery()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
initQuery() {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
const endYear = end.getFullYear()
|
||||
var endMonth = end.getMonth() + 1
|
||||
if (end.getMonth() + 1 < 10) {
|
||||
endMonth = '0' + endMonth.toString()
|
||||
}
|
||||
var endDay = end.getDate()
|
||||
if (end.getDate() < 10) {
|
||||
endDay = '0' + endDay.toString()
|
||||
}
|
||||
const endDate = endYear + '-' + endMonth + '-' + endDay + ' 23:59:59'
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
const startYear = start.getFullYear()
|
||||
var startMonth = start.getMonth() + 1
|
||||
if (start.getMonth() + 1 < 10) {
|
||||
startMonth = '0' + startMonth.toString()
|
||||
}
|
||||
var startDay = start.getDate()
|
||||
if (start.getDate() < 10) {
|
||||
startDay = '0' + startDay.toString()
|
||||
}
|
||||
const startDate = startYear + '-' + startMonth + '-' + startDay + ' 00:00:00'
|
||||
this.$set(this.query, 'createTime', [startDate, endDate])
|
||||
this.crud.toQuery()
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
this.showDtlLoading = true
|
||||
download('/api/subpackagerelation/download', this.crud.query).then(result => {
|
||||
debugger
|
||||
downloadFile(result, '子卷包装', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
this.showDtlLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
this.showDtlLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,8 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -209,8 +210,8 @@ import crudTask from '@/views/wms/sch/task/task'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudClassstandard from '@/views/wms/basedata/master/class/classstandard'
|
||||
@@ -219,7 +220,7 @@ export default {
|
||||
name: 'Task',
|
||||
dicts: ['acs_task_type', 'vehicle_type'],
|
||||
components: {
|
||||
pagination, crudOperation, rrOperation, Treeselect, udOperation
|
||||
pagination, crudOperation, rrOperation, Treeselect, DateRangePicker
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
@@ -255,6 +256,7 @@ export default {
|
||||
permission: {
|
||||
|
||||
},
|
||||
query_flag: true,
|
||||
rules: {},
|
||||
classes1: []
|
||||
}
|
||||
@@ -267,13 +269,16 @@ export default {
|
||||
crudTask.getFinishType().then(data => {
|
||||
this.finishTypeList = data
|
||||
})
|
||||
// this.crud.query.task_status = ['-1']
|
||||
// this.crud.toQuery()
|
||||
this.crud.query.createTime = [new Date().daysAgo(7), new Date()]
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
if (this.query_flag) {
|
||||
this.crud.query.begin_time = (new Date().daysAgo(7)).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
},
|
||||
initClass1() {
|
||||
const param = {
|
||||
@@ -285,6 +290,19 @@ export default {
|
||||
this.classes1 = data
|
||||
})
|
||||
},
|
||||
onInput() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
mytoQuery(array1) {
|
||||
if (array1 === null) {
|
||||
this.crud.query.begin_time = ''
|
||||
this.crud.query.end_time = ''
|
||||
} else {
|
||||
this.crud.query.begin_time = array1[0]
|
||||
this.crud.query.end_time = array1[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
buildTree(classes) {
|
||||
classes.forEach(data => {
|
||||
if (data.children) {
|
||||
|
||||
@@ -63,24 +63,6 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!--<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.io_bill_status"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="物料">
|
||||
<label slot="label">物 料:</label>
|
||||
<el-input
|
||||
@@ -157,6 +139,40 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否回传MES">
|
||||
<el-select
|
||||
v-model="query.upload_mes"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="是否回传"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.is_upload"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否回传SAP">
|
||||
<el-select
|
||||
v-model="query.upload_sap"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="是否回传"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.is_upload"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
@@ -165,7 +181,8 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
@@ -286,6 +303,7 @@ import ViewDialog from '@/views/wms/st/inAndOutReturn/ViewDialog'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
name: 'Return',
|
||||
@@ -315,6 +333,7 @@ export default {
|
||||
mstrow: {},
|
||||
fullscreenLoading: false,
|
||||
storlist: [],
|
||||
query_flag: true,
|
||||
billtypelist: [],
|
||||
showDtlLoading: false
|
||||
}
|
||||
@@ -331,18 +350,36 @@ export default {
|
||||
})
|
||||
// debugger
|
||||
this.billtypelist = this.dict.ST_INV_OUT_TYPE
|
||||
this.crud.query.createTime = [new Date().daysAgo(30), new Date()]
|
||||
this.initQuery()
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.query_flag) {
|
||||
this.crud.query.begin_time = (new Date().daysAgo(30)).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
},
|
||||
/* 搜索框出入类型 默认出库*/
|
||||
initQuery() {
|
||||
this.query.io_type = '1'
|
||||
this.query.is_upload = '0'
|
||||
this.crud.toQuery()
|
||||
},
|
||||
// [CRUD.HOOK.beforeRefresh]() {
|
||||
// return true
|
||||
// },
|
||||
mytoQuery(array1) {
|
||||
if (array1 === null) {
|
||||
this.crud.query.begin_time = ''
|
||||
this.crud.query.end_time = ''
|
||||
} else {
|
||||
this.crud.query.begin_time = array1[0]
|
||||
this.crud.query.end_time = array1[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
onInput() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
|
||||
@@ -256,8 +256,37 @@ export default {
|
||||
crudUserStor.getUserStor().then(res => {
|
||||
this.storlist = res
|
||||
})
|
||||
this.initQuery()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
methods: {
|
||||
initQuery() {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
const endYear = end.getFullYear()
|
||||
var endMonth = end.getMonth() + 1
|
||||
if (end.getMonth() + 1 < 10) {
|
||||
endMonth = '0' + endMonth.toString()
|
||||
}
|
||||
var endDay = end.getDate()
|
||||
if (end.getDate() < 10) {
|
||||
endDay = '0' + endDay.toString()
|
||||
}
|
||||
const endDate = endYear + '-' + endMonth + '-' + endDay + ' 23:59:59'
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
const startYear = start.getFullYear()
|
||||
var startMonth = start.getMonth() + 1
|
||||
if (start.getMonth() + 1 < 10) {
|
||||
startMonth = '0' + startMonth.toString()
|
||||
}
|
||||
var startDay = start.getDate()
|
||||
if (start.getDate() < 10) {
|
||||
startDay = '0' + startDay.toString()
|
||||
}
|
||||
const startDate = startYear + '-' + startMonth + '-' + startDay + ' 00:00:00'
|
||||
this.$set(this.query, 'createTime', [startDate, endDate])
|
||||
this.crud.toQuery()
|
||||
},
|
||||
canUd(row) {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
|
||||
@@ -233,8 +233,37 @@ export default {
|
||||
crudUserStor.getUserStor().then(res => {
|
||||
this.storlist = res
|
||||
})
|
||||
this.initQuery()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
methods: {
|
||||
initQuery() {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
const endYear = end.getFullYear()
|
||||
var endMonth = end.getMonth() + 1
|
||||
if (end.getMonth() + 1 < 10) {
|
||||
endMonth = '0' + endMonth.toString()
|
||||
}
|
||||
var endDay = end.getDate()
|
||||
if (end.getDate() < 10) {
|
||||
endDay = '0' + endDay.toString()
|
||||
}
|
||||
const endDate = endYear + '-' + endMonth + '-' + endDay + ' 23:59:59'
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
const startYear = start.getFullYear()
|
||||
var startMonth = start.getMonth() + 1
|
||||
if (start.getMonth() + 1 < 10) {
|
||||
startMonth = '0' + startMonth.toString()
|
||||
}
|
||||
var startDay = start.getDate()
|
||||
if (start.getDate() < 10) {
|
||||
startDay = '0' + startDay.toString()
|
||||
}
|
||||
const startDate = startYear + '-' + startMonth + '-' + startDay + ' 00:00:00'
|
||||
this.$set(this.query, 'createTime', [startDate, endDate])
|
||||
this.crud.toQuery()
|
||||
},
|
||||
canUd(row) {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
|
||||
@@ -210,8 +210,37 @@ export default {
|
||||
crudUserStor.getUserStor().then(res => {
|
||||
this.storlist = res
|
||||
})
|
||||
this.initQuery()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
methods: {
|
||||
initQuery() {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
const endYear = end.getFullYear()
|
||||
var endMonth = end.getMonth() + 1
|
||||
if (end.getMonth() + 1 < 10) {
|
||||
endMonth = '0' + endMonth.toString()
|
||||
}
|
||||
var endDay = end.getDate()
|
||||
if (end.getDate() < 10) {
|
||||
endDay = '0' + endDay.toString()
|
||||
}
|
||||
const endDate = endYear + '-' + endMonth + '-' + endDay + ' 23:59:59'
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
const startYear = start.getFullYear()
|
||||
var startMonth = start.getMonth() + 1
|
||||
if (start.getMonth() + 1 < 10) {
|
||||
startMonth = '0' + startMonth.toString()
|
||||
}
|
||||
var startDay = start.getDate()
|
||||
if (start.getDate() < 10) {
|
||||
startDay = '0' + startDay.toString()
|
||||
}
|
||||
const startDate = startYear + '-' + startMonth + '-' + startDay + ' 00:00:00'
|
||||
this.$set(this.query, 'createTime', [startDate, endDate])
|
||||
this.crud.toQuery()
|
||||
},
|
||||
canUd(row) {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
|
||||
@@ -183,7 +183,6 @@ export default {
|
||||
title: '出库冲销',
|
||||
url: 'api/outcharge',
|
||||
idField: 'iostorinv_id',
|
||||
sort: 'iostorinv_id,desc',
|
||||
crudMethod: { ...crudOutchargefrom },
|
||||
optShow: {
|
||||
add: false,
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
@@ -53,7 +53,8 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="厚度幅宽">
|
||||
@@ -175,6 +176,7 @@ export default {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
storlist: [],
|
||||
query_flag: true,
|
||||
showDtlLoading: false
|
||||
}
|
||||
},
|
||||
@@ -188,18 +190,41 @@ export default {
|
||||
crudUserStor.getUserStor().then(res => {
|
||||
this.storlist = res
|
||||
})
|
||||
this.crud.query.createTime = [new Date().daysAgo(7), new Date()]
|
||||
},
|
||||
methods: {
|
||||
/* 搜索框创建时间默认最近一周*/
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.query_flag) {
|
||||
this.crud.query.begin_time = (new Date().daysAgo(7)).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
|
||||
this.query_flag = false
|
||||
}
|
||||
},
|
||||
onInput() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
mytoQuery(array1) {
|
||||
if (array1 === null) {
|
||||
this.crud.query.begin_time = ''
|
||||
this.crud.query.end_time = ''
|
||||
} else {
|
||||
this.crud.query.begin_time = array1[0]
|
||||
this.crud.query.end_time = array1[1]
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_INV_OUT_TYPE[row.bill_type]
|
||||
},
|
||||
downdtl() {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
this.showDtlLoading = true
|
||||
const data = {
|
||||
'stor_id': this.crud.query.stor_id,
|
||||
'bill_types': this.crud.query.bill_types,
|
||||
'with': this.crud.query.with,
|
||||
'pcsn': this.crud.query.pcsn,
|
||||
'customer_name': this.crud.query.customer_name
|
||||
}
|
||||
if (this.crud.query.createTime !== undefined) {
|
||||
@@ -208,9 +233,9 @@ export default {
|
||||
}
|
||||
download('/api/out/OutQuery/download2', data).then(result => {
|
||||
downloadFile(result, '成品出库查询', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
this.showDtlLoading = false
|
||||
}).catch(() => {
|
||||
crud.downloadLoading = false
|
||||
this.showDtlLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user