Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -103,7 +103,7 @@
|
||||
<el-table-column label="车间" prop="workshop_id" show-overflow-tooltip/>
|
||||
<el-table-column label="物料编号" prop="material_code" show-overflow-tooltip width="130"/>
|
||||
<el-table-column :min-width="flexWidth('material_name', crud.data, '物料名称')" label="物料名称" prop="material_name" show-overflow-tooltip/>
|
||||
<el-table-column :min-width="flexWidth('ask_time', crud.data, '要求到货日期')" label="要求到货日期" prop="askTime"/>
|
||||
<el-table-column label="要求到货日期" prop="askTime" show-overflow-tooltip width="150"/>
|
||||
<el-table-column label="重量" min-width="120" prop="show_qty" show-overflow-tooltip/>
|
||||
<!-- <el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="安全库存" />-->
|
||||
<!-- <el-table-column label="总重量" align="center" prop="total_qty"/>-->
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
<el-table-column :formatter="workshopFormat" label="车间" prop="workshop_id" show-overflow-tooltip/>
|
||||
<el-table-column label="物料编号" prop="material_code" show-overflow-tooltip width="130"/>
|
||||
<el-table-column label="物料名称" prop="material_name" show-overflow-tooltip width="130"/>
|
||||
<el-table-column label="要求到货日期" prop="askTime" show-overflow-tooltip width="130"/>
|
||||
<el-table-column label="要求到货日期" prop="askTime" show-overflow-tooltip width="150"/>
|
||||
<el-table-column label="重量" min-width="120" prop="show_qty" show-overflow-tooltip/>
|
||||
<el-table-column label="确认交货日期" min-width="120" prop="agree_time" show-overflow-tooltip/>
|
||||
<el-table-column label="订单编号" min-width="120" prop="po_code" show-overflow-tooltip/>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="aps提交"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="true"
|
||||
width="500px"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:show-close="true"
|
||||
:visible.sync="dialogVisible"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
title="aps提交"
|
||||
width="500px"
|
||||
@close="close"
|
||||
>
|
||||
<div class="head-container">
|
||||
<div>
|
||||
<!-- 搜索 -->
|
||||
<el-form ref="form" :model="form1" :rules="rules" size="mini" label-width="110px">
|
||||
<el-form ref="form" :model="form1" :rules="rules" label-width="110px" size="mini">
|
||||
|
||||
|
||||
<el-form-item label="订单阶段:" prop="bill_code">
|
||||
@@ -22,13 +22,13 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="日期区间:" prop="createTime">
|
||||
<el-form-item label="订单交期:" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="form.createTime"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
</el-form>
|
||||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="queryStruct">确认
|
||||
<el-button class="filter-item" icon="el-icon-search" size="mini" type="success" @click="queryStruct">确认
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
queryStruct() {
|
||||
// 校验开始日期和结束日期是否为空
|
||||
if (!this.form.createTime || !this.form.createTime[0] || !this.form.createTime[1]) {
|
||||
this.showErrorNotification('请选择日期区间')
|
||||
this.showErrorNotification('请选择订单交期')
|
||||
return
|
||||
}
|
||||
// 校验销售订单号值是否为空
|
||||
|
||||
@@ -8,46 +8,91 @@
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-form-item label="销售单号">
|
||||
<el-input
|
||||
v-model="query.sale_code"
|
||||
class="filter-item"
|
||||
clearable
|
||||
placeholder="销售单号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料搜索">
|
||||
<el-input
|
||||
v-model="query.material"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="物料编码、名称或规格"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
clearable
|
||||
placeholder="物料编码、名称或规格"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单交期">
|
||||
<el-date-picker
|
||||
v-model="query.planTime"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
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 label="单据类型">
|
||||
<el-select
|
||||
v-model="query.sale_type"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.PCS_SAL_TYPE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="生成方式">
|
||||
<el-select
|
||||
v-model="query.create_mode"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_CREATE_MODE"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
style="width: 200px"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 200px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
@@ -58,24 +103,24 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品系列">
|
||||
<treeselect
|
||||
v-model="query.product_series"
|
||||
:options="classes3"
|
||||
:auto-load-root-options="false"
|
||||
:load-options="loadChildNodes"
|
||||
style="width: 200px;"
|
||||
placeholder="请选择"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="产品系列">-->
|
||||
<!-- <treeselect-->
|
||||
<!-- v-model="query.product_series"-->
|
||||
<!-- :auto-load-root-options="false"-->
|
||||
<!-- :load-options="loadChildNodes"-->
|
||||
<!-- :options="classes3"-->
|
||||
<!-- placeholder="请选择"-->
|
||||
<!-- style="width: 200px;"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<rrOperation :crud="crud"/>
|
||||
</el-form>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="deleteApsData"
|
||||
>
|
||||
清空测试数据
|
||||
@@ -86,9 +131,9 @@
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="uploadShow = true"
|
||||
>
|
||||
导入
|
||||
@@ -97,9 +142,9 @@
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
type="success"
|
||||
@click="importin"
|
||||
>
|
||||
aps提交
|
||||
@@ -107,10 +152,10 @@
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:close-on-click-modal="false"
|
||||
:title="crud.status.title"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
width="1200px"
|
||||
>
|
||||
<el-form
|
||||
@@ -122,8 +167,9 @@
|
||||
>
|
||||
<el-form-item label="车间" prop="product_area">
|
||||
<!-- unit_list-->
|
||||
<el-select v-model="form.product_area" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
placeholder=""
|
||||
<el-select
|
||||
v-model="form.product_area" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
placeholder=""
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
@@ -134,13 +180,15 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="销售单号" prop="sale_code">
|
||||
<el-input v-model="form.sale_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
<el-input
|
||||
v-model="form.sale_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同号" prop="contract_code">
|
||||
<el-input v-model="form.contract_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
<el-input
|
||||
v-model="form.contract_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="计量单位" prop="unit_name">
|
||||
@@ -154,8 +202,9 @@
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<el-input v-model="form.material_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
<el-input
|
||||
v-model="form.material_code" :disabled="crud.status.edit > 0 || crud.status.view > 0"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="客户名称" prop="cust_name">
|
||||
@@ -171,9 +220,9 @@
|
||||
<el-form-item label="计划交期时间" prop="plandeliver_date">
|
||||
<el-date-picker
|
||||
v-model="form.plandeliverDate"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
style="width: 200px;"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
/>
|
||||
<el-form-item label="订单数量" prop="sale_qty">
|
||||
<el-input-number v-model="form.sale_qty" style="width: 200px;"/>
|
||||
@@ -204,94 +253,114 @@
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column
|
||||
prop="sale_code"
|
||||
label="销售单号"
|
||||
min-width="100"
|
||||
prop="sale_code"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="行号"
|
||||
min-width="60"
|
||||
prop="seq_no"
|
||||
label="销售单行号"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- <el-table-column prop="seq_no" label="明细序号" /> -->
|
||||
|
||||
<el-table-column prop="contract_code" label="合同号"
|
||||
:min-width="flexWidth('contract_code', crud.data, '合同号')"
|
||||
/>
|
||||
|
||||
<el-table-column prop="material_code" label="物料编码"
|
||||
:min-width="flexWidth('material_code', crud.data, '物料编码')"
|
||||
<el-table-column
|
||||
:min-width="flexWidth('contract_code', crud.data, '合同号')" label="合同号"
|
||||
prop="contract_code"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
:min-width="flexWidth('material_code', crud.data, '物料编码')" label="物料编码"
|
||||
prop="material_code"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="material_spec"
|
||||
label="物料规格"
|
||||
:min-width="flexWidth('material_spec', crud.data, '物料规格')"
|
||||
label="物料规格"
|
||||
prop="material_spec"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="material_name"
|
||||
label="物料名称"
|
||||
:min-width="flexWidth('material_name', crud.data, '物料名称')"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- :min-width="flexWidth('material_name', crud.data, '物料名称')"-->
|
||||
<!-- label="物料名称"-->
|
||||
<!-- prop="material_name"-->
|
||||
<!-- show-overflow-tooltip-->
|
||||
<!-- />-->
|
||||
|
||||
<el-table-column prop="product_area" label="工段">
|
||||
<el-table-column label="工段" prop="product_area">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.product_area[scope.row.product_area] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="sale_qty" label="订单数量"/>
|
||||
<el-table-column label="订单数量" min-width="80" prop="sale_qty"/>
|
||||
<el-table-column label="需生产数量" min-width="88" prop="need_product_qty"/>
|
||||
<el-table-column label="已生产数量" min-width="88" prop="product_qty"/>
|
||||
<el-table-column label="刻字数量" prop="lettering_qty"/>
|
||||
<el-table-column label="预入库数量" min-width="88" prop="instor_qty"/>
|
||||
<el-table-column label="入库数量" prop="in_storage_qty"/>
|
||||
<el-table-column label="发货数量" prop="sendout_qty"/>
|
||||
|
||||
<el-table-column
|
||||
prop="qty_unit_name"
|
||||
label="计量单位"
|
||||
show-overflow-tooltip
|
||||
min-width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="plandeliverDate"
|
||||
label="前段计划交期"
|
||||
label="预入库交期"
|
||||
min-width="100"
|
||||
prop="warehousing_date"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="status" label="前段状态">
|
||||
<el-table-column
|
||||
label="计划交期"
|
||||
min-width="100"
|
||||
prop="plandeliverDate"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="订单交期"
|
||||
min-width="100"
|
||||
prop="order_date"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="订单状态" prop="status">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.PCS_SALE_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="behindPlandeliverDate"
|
||||
label="后段计划交期"
|
||||
min-width="100"
|
||||
label="计量单位"
|
||||
min-width="80"
|
||||
prop="qty_unit_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="behind_submit_flag" label="后段状态">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.PCS_SALE_STATUS[scope.row.behind_submit_flag] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="后段计划交期"-->
|
||||
<!-- min-width="100"-->
|
||||
<!-- prop="behindPlandeliverDate"-->
|
||||
<!-- show-overflow-tooltip-->
|
||||
<!-- />-->
|
||||
<!-- <el-table-column label="后段状态" prop="behind_submit_flag">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ dict.label.PCS_SALE_STATUS[scope.row.behind_submit_flag] }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column
|
||||
prop="rawmaterial_name"
|
||||
label="原辅料信息"
|
||||
:min-width="flexWidth('rawmaterial_name', crud.data, '原辅料信息')"
|
||||
label="原辅料信息"
|
||||
prop="rawmaterial_name"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="rate_qty"
|
||||
label="单重"
|
||||
:min-width="flexWidth('rate_qty', crud.data, '单重')"
|
||||
label="单重"
|
||||
prop="rate_qty"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="canuse_qty"
|
||||
label="原辅料库存"
|
||||
:min-width="flexWidth('canuse_qty', crud.data, '原辅料库存')"
|
||||
label="原辅料库存"
|
||||
prop="canuse_qty"
|
||||
show-overflow-tooltip
|
||||
width="90"
|
||||
/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="early_start_time"-->
|
||||
@@ -300,40 +369,35 @@
|
||||
<!-- show-overflow-tooltip-->
|
||||
<!-- />-->
|
||||
<el-table-column
|
||||
prop="product_qty"
|
||||
label="生产数量"
|
||||
:min-width="flexWidth('product_qty', crud.data, '生产数量')"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="sale_type"
|
||||
label="销售单类型"
|
||||
min-width="100"
|
||||
prop="sale_type"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.PCS_SAL_TYPE[scope.row.sale_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_mode" label="生成方式" min-width="100">
|
||||
<el-table-column label="生成方式" min-width="100" prop="create_mode">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.ST_CREATE_MODE[scope.row.create_mode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_name" label="创建人"/>
|
||||
<el-table-column label="创建人" prop="create_name"/>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
:min-width="flexWidth('createTime', crud.data, '创建时间')"
|
||||
/>
|
||||
<el-table-column prop="update_time" label="修改时间"
|
||||
:min-width="flexWidth('update_time',crud.data,'修改时间')"
|
||||
label="创建时间"
|
||||
prop="createTime"
|
||||
/>
|
||||
<el-table-column
|
||||
:min-width="flexWidth('update_time',crud.data,'修改时间')" label="修改时间"
|
||||
prop="update_time"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="remark"
|
||||
label="备注"
|
||||
show-overflow-tooltip
|
||||
min-width="200"
|
||||
prop="remark"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!-- <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
@@ -358,7 +422,7 @@
|
||||
<script>
|
||||
import crudSaleOrder from '@/views/wms/pcs/saleorder/saleOrder'
|
||||
import customerbase from '@/api/wms/basedata/master/customerbase'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import UploadDialog from '@/views/wms/pcs/saleorder/UploadDialog'
|
||||
@@ -367,7 +431,6 @@ import pagination from '@crud/Pagination'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import crudBigScreen from '@/api/wms/bigScreen/bigScreen'
|
||||
|
||||
const defaultForm = {
|
||||
sale_id: null,
|
||||
|
||||
102
mes/qd/src/views/wms/stata_manage/historyivt/LinChart.vue
Normal file
102
mes/qd/src/views/wms/stata_manage/historyivt/LinChart.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<div id="myId" :class="className" :style="{height:height,width:width}" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import { debounce } from '@/utils'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
},
|
||||
chartData: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
chartData: {
|
||||
deep: true,
|
||||
handler() {
|
||||
// 每次清除之后重新渲染
|
||||
const myChart = echarts.init(document.getElementById('myId'))
|
||||
myChart.clear()
|
||||
this.setOptions()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
this.__resizeHandler = debounce(() => {
|
||||
if (this.chart) {
|
||||
this.chart.resize()
|
||||
}
|
||||
}, 100)
|
||||
window.addEventListener('resize', this.__resizeHandler)
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
window.removeEventListener('resize', this.__resizeHandler)
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
this.setOptions()
|
||||
},
|
||||
setOptions() {
|
||||
this.chart.setOption({
|
||||
title: {
|
||||
text: 'material_code'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: this.chartData.legenda
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
toolbox: {
|
||||
feature: {
|
||||
saveAsImage: {}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: this.chartData.xAxisa
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: this.chartData.seriesa
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
42
mes/qd/src/views/wms/stata_manage/historyivt/historyivt.js
Normal file
42
mes/qd/src/views/wms/stata_manage/historyivt/historyivt.js
Normal file
@@ -0,0 +1,42 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/historyivt',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/historyivt/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/historyivt',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getHeader() {
|
||||
return request({
|
||||
url: 'api/historyivt/getHeader',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function autoWeb(data) {
|
||||
return request({
|
||||
url: 'api/historyivt/autoWeb',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getHeader, autoWeb }
|
||||
216
mes/qd/src/views/wms/stata_manage/historyivt/index.vue
Normal file
216
mes/qd/src/views/wms/stata_manage/historyivt/index.vue
Normal file
@@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
size="mini"
|
||||
>
|
||||
|
||||
<el-form-item label="仓库">
|
||||
<label slot="label">仓 库:</label>
|
||||
<el-select
|
||||
v-model="query.stor_id"
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="日期">
|
||||
<label slot="label">日 期:</label>
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:clearable="false"
|
||||
:disabled="true"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请输入物料编码、名称、规格"
|
||||
style="width: 230px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission"/>
|
||||
<!--表格渲染-->
|
||||
<el-row :gutter="20">
|
||||
<el-col :xs="24" :sm="24" :lg="24">
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
:max-height="590"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="45" />
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="1" label="物料编码" min-width="150" />
|
||||
<el-table-column prop="2" label="物料名称" min-width="200" show-overflow-tooltip />
|
||||
<el-table-column prop="3" label="物料规格" min-width="150" />
|
||||
<template v-for="(col,index) in cols">
|
||||
<el-table-column v-if="col" :prop="col.prop" :label="col.label" align="center" min-width="140" />
|
||||
</template>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :xs="24" :sm="24" :lg="24">
|
||||
<div class="chart-wrapper">
|
||||
<Lin-chart :chart-data="dataList" />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudHistoryivt, { autoWeb } from '@/views/wms/stata_manage/historyivt/historyivt'
|
||||
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 DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import Date from '@/utils/datetime'
|
||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import LinChart from '@/views/wms/stata_manage/historyivt/LinChart'
|
||||
|
||||
export default {
|
||||
name: 'Historyivt',
|
||||
components: { pagination, crudOperation, rrOperation, LinChart, udOperation, DateRangePicker },
|
||||
mixins: [presenter(), header(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '历史库存分析',
|
||||
url: 'api/historyivt',
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
crudMethod: { ...crudHistoryivt },
|
||||
props: {
|
||||
// 每页数据条数
|
||||
size: 10
|
||||
},
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cols: [],
|
||||
storlist: [],
|
||||
dataList: '',
|
||||
query_flag: true,
|
||||
openParam: null,
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
}}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
beforeDestroy() {
|
||||
// js提供的clearInterval方法用来清除定时器
|
||||
console.log('定时器销毁')
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
created() {
|
||||
crudStorattr.getStor({ 'stor_type': '' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
this.crud.query.createTime = [new Date().daysAgo(6), new Date()]
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.query_flag) {
|
||||
this.crud.query.begin_time = (new Date().daysAgo(6)).strftime('%F', 'zh')
|
||||
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
|
||||
this.crud.query.stor_id = '1528627995269533696'
|
||||
this.query_flag = false
|
||||
}
|
||||
this.getHeader()
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
onInput() {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
getHeader() {
|
||||
crudHistoryivt.getHeader().then(res => {
|
||||
this.cols = res
|
||||
})
|
||||
},
|
||||
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()
|
||||
},
|
||||
init: function() {
|
||||
this.initStageData()
|
||||
},
|
||||
initStageData() {
|
||||
this.timer = setInterval(() => { // 定时刷新
|
||||
console.log('定时器启动')
|
||||
this.initStatus()
|
||||
}, 4000)
|
||||
},
|
||||
initStatus() {
|
||||
autoWeb(this.crud.query).then(res => {
|
||||
this.dataList = res
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
101
mes/qd/src/views/wms/stata_manage/realtimeivt/PieChart.vue
Normal file
101
mes/qd/src/views/wms/stata_manage/realtimeivt/PieChart.vue
Normal file
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div :class="className" :style="{height:height,width:width}" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
import { debounce } from '@/utils'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
},
|
||||
chartData: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
chartData: {
|
||||
deep: true,
|
||||
handler() {
|
||||
this.setOptions()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initChart()
|
||||
this.__resizeHandler = debounce(() => {
|
||||
if (this.chart) {
|
||||
this.chart.resize()
|
||||
}
|
||||
}, 100)
|
||||
window.addEventListener('resize', this.__resizeHandler)
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
}
|
||||
window.removeEventListener('resize', this.__resizeHandler)
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart() {
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
this.setOptions()
|
||||
},
|
||||
setOptions() {
|
||||
this.chart.setOption({
|
||||
title: {
|
||||
text: '统计',
|
||||
subtext: '',
|
||||
subtextStyle: {
|
||||
'color': '#333'
|
||||
},
|
||||
left: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left'
|
||||
},
|
||||
// color: ['#e0a803', '#27aa0f', '#d2d1d1'], // 修改图饼颜色
|
||||
series: [
|
||||
{
|
||||
name: '百分比',
|
||||
type: 'pie',
|
||||
radius: '70%',
|
||||
data: this.chartData,
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0,0,0,0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
160
mes/qd/src/views/wms/stata_manage/realtimeivt/index.vue
Normal file
160
mes/qd/src/views/wms/stata_manage/realtimeivt/index.vue
Normal file
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="所属仓库">
|
||||
<label slot="label">仓 库:</label>
|
||||
<el-select
|
||||
v-model="query.stor_id"
|
||||
size="mini"
|
||||
placeholder="所属仓库"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="物料编码、名称、规格"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表格渲染-->
|
||||
<el-row :gutter="20">
|
||||
<el-col :xs="24" :sm="24" :lg="24">
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
size="mini"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_name" label="物料名称" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="库存" :formatter="crud.formatNum3" />
|
||||
<el-table-column show-overflow-tooltip prop="unit_name" label="单位" />
|
||||
<el-table-column show-overflow-tooltip prop="pro" label="占比(%)" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<hr/>
|
||||
<el-row :gutter="20">
|
||||
<el-col :xs="24" :sm="24" :lg="24">
|
||||
<div class="chart-wrapper">
|
||||
<pie-chart :chart-data="ivtList" />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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 crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import Realtimeivt, { autoWeb } from '@/views/wms/stata_manage/realtimeivt/realtimeivt'
|
||||
import PieChart from '@/views/wms/stata_manage/realtimeivt/PieChart'
|
||||
|
||||
export default {
|
||||
name: 'RealTimeIvt',
|
||||
components: { crudOperation, rrOperation, PieChart, udOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '实时库存分析',
|
||||
optShow: { add: false, reset: true },
|
||||
idField: 'stockrecord_id',
|
||||
url: '/api/realtimeivt',
|
||||
crudMethod: { ...Realtimeivt }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
data() {
|
||||
return {
|
||||
query_flag: true,
|
||||
permission: {},
|
||||
storlist: [],
|
||||
ivtList: []
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
this.init()
|
||||
},
|
||||
beforeDestroy() {
|
||||
// js提供的clearInterval方法用来清除定时器
|
||||
console.log('定时器销毁')
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
created() {
|
||||
crudStorattr.getStor({ 'stor_type': '' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
if (this.query_flag) {
|
||||
this.crud.query.stor_id = '1528627995269533696'
|
||||
this.query_flag = false
|
||||
}
|
||||
},
|
||||
init: function() {
|
||||
this.initStageData()
|
||||
},
|
||||
initStageData() {
|
||||
this.timer = setInterval(() => { // 定时刷新
|
||||
console.log('定时器启动')
|
||||
this.initStatus()
|
||||
}, 4000)
|
||||
},
|
||||
initStatus() {
|
||||
autoWeb(this.crud.query).then(res => {
|
||||
this.ivtList = res.ivtList
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
40
mes/qd/src/views/wms/stata_manage/realtimeivt/realtimeivt.js
Normal file
40
mes/qd/src/views/wms/stata_manage/realtimeivt/realtimeivt.js
Normal file
@@ -0,0 +1,40 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/realtimeivt',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/realtimeivt/delete',
|
||||
method: 'post',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/realtimeivt/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function autoWeb(data) {
|
||||
return request({
|
||||
url: 'api/realtimeivt/autoWeb',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
del,
|
||||
autoWeb
|
||||
}
|
||||
Reference in New Issue
Block a user