解决冲突

master
taozi 3 months ago
commit 105b381a90
  1. 8
      src/api/firstOrder/inbound.js
  2. 890
      src/views/dataAnalysis/index.vue
  3. 6
      src/views/firstOrder/components/batchSelectionDialog.vue
  4. 685
      src/views/firstOrder/components/inDialog.vue
  5. 835
      src/views/firstOrder/components/outDialog.vue
  6. 88
      src/views/materials/index.vue

@ -80,3 +80,11 @@ export const editList = (onePutStorageId) => {
cryptoData: false
})
}
export const getStatistics = data => {
return request({
url: '/smartpark/oneForm/getOnePutOneForm',
method: 'post',
data: data,
})
}

@ -0,0 +1,890 @@
<template>
<basic-container>
<el-row :gutter=24>
<el-row :gutter=24 v-if="this.permission.departmentSearch" >
<el-form ref="form" :model="form" label-width="80px">
<!-- <el-col :span="6">
<el-form-item label="日期">
<el-date-picker v-model="value1" type="daterange" range-separator="" start-placeholder="开始日期"
end-placeholder="结束日期" style="width:100%">
</el-date-picker>
</el-form-item>
</el-col> -->
<el-col :span="6">
<el-form-item label="部门">
<el-select v-model="value" placeholder="请选择部门" style="width:100%">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-button type="primary" @click="onSubmit">搜索</el-button>
<el-button @click="onSubmit">重置</el-button>
</el-col>
</el-form>
</el-row>
<el-col :span="12">
<div class="title">物资申请类别
</div>
<div id="echarts1" style="width: 100%; height:400px"></div>
</el-col>
<el-col :span="12">
<div class="title">物资申请价值
</div>
<div id="echarts2" style="width: 100%; height:400px"></div>
</el-col>
<el-col :span="12">
<div class="title">物资库存
</div>
<div id="echarts3" style="width: 100%; height:400px"></div>
</el-col>
<el-col :span="12">
<div class="title">消耗品价值分析
<el-select v-model="value2" placeholder="请选择" style="float:right" @change="changeSelect()">
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
<div id="echarts4" style="width: 100%; height:400px"></div>
</el-col>
</el-row>
</basic-container>
</template>
<script>
import * as echarts from "echarts";
import {mapGetters} from "vuex";
export default {
computed: {
...mapGetters(["userInfo", "permission"]),
},
data() {
return {
options: [{
value: '部门一',
label: '部门一'
}, {
value: '部门二',
label: '部门二'
}, {
value: '部门三',
label: '部门三'
}, {
value: '部门四',
label: '部门四'
}, {
value: '部门五',
label: '部门五'
}],
value: '',
options2: [{
value: '年度',
label: '年度'
}, {
value: '季度',
label: '季度'
}, {
value: '月份',
label: '月份'
}],
value2: '年度'
}
},
mounted() {
this.initEcharts1()
this.initEcharts2()
this.initEcharts3()
this.initEcharts4(["2022年", "2023年", "2024年", "2025年"], [23, 78, 87, 90])
},
methods: {
initEcharts1() {
var myChart = echarts.init(document.getElementById("echarts1"));
//
var option = {
title: {
text: '',
x: 'center'
},
backgroundColor: '#fff',
tooltip: {
trigger: 'item',
},
xAxis: {
data: ["全部", "易耗品", "耐用品"],
axisTick: {
show: false
},
axisLine: {
show: false
},
axisLabel: {
textStyle: {
color: '#888'
},
margin: 20, //线
},
},
yAxis: {
splitLine: {
show: true,
lineStyle: {
color: '#eee',
type: 'solid'
}
},
axisTick: {
show: false
},
axisLine: {
show: false
},
axisLabel: {
textStyle: {
color: '#888'
},
}
},
series: [
{//
"name": "",
"type": "pictorialBar",
"symbolSize": [100, 30],
"symbolOffset": [0, 18],
"z": 12,
"data": [{
"name": "",
"value": "100",
"itemStyle": {
"normal": {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: "rgba(89,211,255,1)"
},
{
offset: 1,
color: "rgba(23,237,194,1)"
}
])
}
}
}, {
"name": "",
"value": "101",
"itemStyle": {
"normal": {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: "rgba(89,211,255,1)"
},
{
offset: 1,
color: "rgba(23,237,194,1)"
}
])
}
}
}, {
"name": "",
"value": "81",
"itemStyle": {
"normal": {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: "rgba(89,211,255,1)"
},
{
offset: 1,
color: "rgba(23,237,194,1)"
}
])
}
}
}]
},
//
{
name: '2020',
type: 'bar',
barWidth: 100,
barGap: '-100%',
itemStyle: {//lenged
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: "rgba(55,255,249,1)"
},
{
offset: 1,
color: "rgba(0,222,215,0.2)"
}
])
},
data: [{
"name": "",
"value": "100",
"itemStyle": {
"normal": {
"color": {
"x": 0,
"y": 0,
"x2": 0,
"y2": 1,
"type": "linear",
"global": false,
"colorStops": [{//
"offset": 0,
"color": "rgba(0,255,245,0.5)"
}, {
"offset": 1,
"color": "#43bafe"
}]
}
}
}
}, {
"name": "",
"value": "101",
"itemStyle": {
"normal": {
"color": {
"x": 0,
"y": 0,
"x2": 0,
"y2": 1,
"type": "linear",
"global": false,
"colorStops": [{//
"offset": 0,
"color": "rgba(0,255,245,0.5)"
}, {
"offset": 1,
"color": "#43bafe"
}]
}
}
}
}, {
"name": "",
"value": "81",
"itemStyle": {
"normal": {
"color": {
"x": 0,
"y": 0,
"x2": 0,
"y2": 1,
"type": "linear",
"global": false,
"colorStops": [{//
"offset": 0,
"color": "rgba(0,255,245,0.5)"
}, {
"offset": 1,
"color": "#43bafe"
}]
}
}
}
}]
},
{ // value - 20
type: 'bar',
barWidth: 100,
barGap: '-100%',
stack: '广告',
itemStyle: {
color: 'transparent'
},
data: [100, 102, 81]
},
{
"name": "", //
"type": "pictorialBar",
"symbolSize": [100, 45],
"symbolOffset": [0, -20],
"z": 12,
"data": [{
"name": "",
"value": "320",
"symbolPosition": "end",
"itemStyle": {
"normal": {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
[{
offset: 0,
color: "rgba(54,127,223,1)"
},
{
offset: 1,
color: "rgba(94,162,254,1)"
}
],
false
),
}
}
}, {
"name": "",
"value": "283",
"symbolPosition": "end",
"itemStyle": {
"normal": {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
[{
offset: 0,
color: "rgba(54,127,223,1)"
},
{
offset: 1,
color: "rgba(94,162,254,1)"
}
],
false
),
}
}
}, {
"name": "",
"value": "272",
"symbolPosition": "end",
"itemStyle": {
"normal": {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
[{
offset: 0,
color: "rgba(54,127,223,1)"
},
{
offset: 1,
color: "rgba(94,162,254,1)"
}
],
false
),
}
}
}]
},
{
"name": "",
"type": "pictorialBar",
"symbolSize": [100, 45],
"symbolOffset": [0, -20],
"z": 12,
"data": [{
"name": "",
"value": "103",
"symbolPosition": "end",
"itemStyle": {
"normal": {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
[{
offset: 0,
color: "rgba(89,211,255,1)"
},
{
offset: 1,
color: "rgba(23,237,194,1)"
}
],
false
),
}
}
}, {
"name": "",
"value": "105",
"symbolPosition": "end",
"itemStyle": {
"normal": {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
[{
offset: 0,
color: "rgba(89,211,255,1)"
},
{
offset: 1,
color: "rgba(23,237,194,1)"
}
],
false
),
}
}
}, {
"name": "",
"value": "84",
"symbolPosition": "end",
"itemStyle": {
"normal": {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1,
[{
offset: 0,
color: "rgba(89,211,255,1)"
},
{
offset: 1,
color: "rgba(23,237,194,1)"
}
],
false
),
}
}
}]
},
{
name: '2019',
type: 'bar',
barWidth: 100,
barGap: '-100%',
stack: '广告',
itemStyle: {
// barBorderRadius: 20,
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 1,
color: "rgba(0,255,100,0.5)"
},
{
offset: 1,
color: "rgba(0,255,100,0.5)"
}
])
},
//
data: [{
"name": "关井数",
"value": "220",
"trueVal": "22",
"itemStyle": {
"normal": {
"color": {
"x": 0,
"y": 0,
"x2": 0,
"y2": 1,
"type": "linear",
"global": false,
"colorStops": [{
offset: 0,
color: "rgba(54,127,223,1)"
},
{
offset: 1,
color: "rgba(94,162,254,1)"
}],
}
}
}
}, {
"name": "开井数",
"value": "182",
"trueVal": "18",
"itemStyle": {
"normal": {
"color": {
"x": 0,
"y": 0,
"x2": 0,
"y2": 1,
"type": "linear",
"global": false,
"colorStops": [{
offset: 0,
color: "rgba(54,127,223,1)"
},
{
offset: 1,
color: "rgba(94,162,254,1)"
}],
}
}
}
}, {
"name": "不在线",
"value": "191",
"trueVal": "19",
"itemStyle": {
"normal": {
"color": {
"x": 0,
"y": 0,
"x2": 0,
"y2": 1,
"type": "linear",
"global": false,
"colorStops": [{
offset: 0,
color: "rgba(54,127,223,1)"
},
{
offset: 1,
color: "rgba(94,162,254,1)"
}],
}
}
}
}
]
}
]
}
;
myChart.setOption(option);
},
initEcharts2() {
var myChart = echarts.init(document.getElementById("echarts2"));
let index = 0;
var colorList = ['#73DDFF', '#73ACFF', '#FDD56A', '#FDB36A', '#FD866A', '#9E87FF', '#58D5FF']
function fun() {
var timer = setInterval(function () {
myChart.dispatchAction({
type: 'hideTip',
seriesIndex: 0,
dataIndex: index
});
//
myChart.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: index
});
//
myChart.dispatchAction({
type: 'downplay',
seriesIndex: 0,
dataIndex: index == 0 ? 5 : index - 1
});
myChart.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: index
});
index++;
if (index > 5) {
index = 0;
}
}, 3000)
}
fun()
setTimeout(function () { fun() }, 5000);
let option = {
title: {
text: '申请价值',
x: 'center',
y: 'center',
textStyle: {
fontSize: 20
}
},
tooltip: {
trigger: 'item'
},
series: [{
type: 'pie',
center: ['50%', '50%'],
radius: ['24%', '45%'],
clockwise: true,
avoidLabelOverlap: true,
hoverOffset: 15,
itemStyle: {
normal: {
color: function (params) {
return colorList[params.dataIndex]
}
}
},
label: {
show: true,
position: 'outside',
formatter: '{a|{b}:{d}%}\n{hr|}',
rich: {
hr: {
backgroundColor: 't',
borderRadius: 3,
width: 3,
height: 3,
padding: [3, 3, 0, -12]
},
a: {
padding: [-30, 15, -20, 15]
}
}
},
labelLine: {
normal: {
length: 20,
length2: 30,
lineStyle: {
width: 1
}
}
},
data: [{
'name': '全部',
'value': 1.45
}, {
'name': '易耗品',
'value': 2.93
}, {
'name': '耐用品',
'value': 3.15
},
],
}]
};
myChart.setOption(option);
},
initEcharts3() {
var myChart = echarts.init(document.getElementById("echarts3"));
var data = ["物品1", "物品2", "物品3", "物品4"]
let option = {
backgroundColor: '#fff',
color: [new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: "#13ace8"
}, {
offset: 1,
color: "#0167e8"
}], false)],
grid: {
left: '8%',
right: '10%',
top: '12%',
bottom: '18%',
containLabel: true
},
tooltip: {
show: "true",
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
yAxis: {
type: 'value',
axisTick: {
show: false
},
axisLine: {
show: false,
lineStyle: {
color: '#ccc',
}
},
axisLabel: {
show: true,
color: "#ccc",
fontSize: 18
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed'
}
},
},
xAxis: [{
axisTick: {
show: false
},
type: 'category',
axisLine: {
show: false
},
axisLabel: {
show: true,
color: '#ccc',
interval: 0,
formatter: function (value) {
return value.split("").join("\n");
}
},
splitLine: {
show: false,
lineStyle: {
type: 'dashed'
}
},
data: data,
}],
series: [{
name: '违规',
type: 'bar',
barWidth: 15,
label: {
normal: {
show: false,
position: 'right',
textStyle: {
color: "#ccc",
fontSize: 14
}
}
},
itemStyle: {
normal: {
// barBorderRadius: [0, 0, 5, 0],
}
},
data: [50, 60, 70, 80]
}]
};
myChart.setOption(option);
},
initEcharts4(xdata, ydata) {
var myChart = echarts.init(document.getElementById("echarts4"));
// var data = ["2022", "2023", "2024", "2025"]
var data = xdata
let option = {
backgroundColor: '#fff',
color: [new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: "#13ace8"
}, {
offset: 1,
color: "#0167e8"
}], false)],
grid: {
left: '8%',
right: '10%',
top: '12%',
bottom: '18%',
containLabel: true
},
tooltip: {
show: "true",
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
yAxis: {
type: 'value',
axisTick: {
show: false
},
axisLine: {
show: false,
lineStyle: {
color: '#ccc',
}
},
axisLabel: {
show: true,
color: "#ccc",
fontSize: 18
},
splitLine: {
show: true,
lineStyle: {
type: 'dashed'
}
},
},
xAxis: [{
axisTick: {
show: false
},
type: 'category',
axisLine: {
show: false
},
axisLabel: {
show: true,
color: '#ccc',
interval: 0,
formatter: function (value) {
return value.split("").join("\n");
}
},
splitLine: {
show: false,
lineStyle: {
type: 'dashed'
}
},
data: data,
}],
series: [{
name: '价值',
type: 'bar',
barWidth: 15,
label: {
normal: {
show: false,
position: 'right',
textStyle: {
color: "#ccc",
fontSize: 14
}
}
},
itemStyle: {
normal: {
// barBorderRadius: [0, 0, 5, 0],
}
},
data: ydata
}]
};
myChart.setOption(option);
},
onSubmit() {
this.$message({
message: '操作成功',
type: 'success'
});
},
changeSelect(value) {
if (this.value2 == '年度') {
this.initEcharts4(["2022年", "2023年", "2024年", "2025年"], [23, 78, 87, 90])
}
if (this.value2 == '季度') {
this.initEcharts4(["一季度", "二季度", "三季度", "四季度"], [23, 28, 97, 40])
}
if (this.value2 == '月份') {
this.initEcharts4(["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], [23, 28, 97, 40, 32, 56, 78, 69, 45, 32, 98, 84])
}
}
},
}
</script>
<style lang="scss" scoped>
::v-deep .el-card__body {
// background: #000;
}
.title {
height: 50px;
line-height: 50px;
}
</style>

@ -26,8 +26,8 @@
<el-table-column label="物料名称" prop="materialName" />
<el-table-column label="规格型号" prop="model" />
<el-table-column label="申请数量" prop="applicationQuantity" />
<el-table-column label="本此出库数量" prop="applicationQuantity" />
<!-- <el-table-column label="已出库数量" prop="outboundQuantity" /> -->
<!-- <el-table-column label="本此出库数量" prop="applicationQuantity" /> -->
<el-table-column label="已出库数量" prop="outboundQuantity" />
<el-table-column label="部门" prop="departmentName" />
<el-table-column label="单位" prop="unit" />
</el-table>
@ -103,7 +103,7 @@ export default {
parentDepartmentName: parentRow.departmentName, //
applicationQuantity: parentRow.applicationQuantity,
ldDemandEndId: parentRow.ldDemandEndId,
// outboundQuantity:parentRow.outboundQuantity,
outboundQuantity:parentRow.outboundQuantity,
}));
//

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,9 +1,28 @@
<template>
<div>
<basic-container>
<avue-crud :option="option" v-model="form" :data="data" @row-del="rowDel" @on-load="onLoad"
:table-loading="loading" @row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange"
@search-reset="searchReset" :page.sync="page">
<avue-crud
:option="option"
v-model="form"
:data="data"
@row-del="rowDel"
@on-load="onLoad"
:table-loading="loading"
@row-update="rowUpdate"
@row-save="rowSave"
@search-change="searchChange"
@search-reset="searchReset"
:page.sync="page"
:upload-after="uploadAfter"
>
<template slot="pictureImg" slot-scope="scope">
<!-- {{scope.row.picture}} -->
<el-image
style="width: 60px; height: 60px"
:src="scope.row.picture"
fit="fill"
></el-image>
</template>
</avue-crud>
</basic-container>
</div>
@ -69,8 +88,7 @@ export default {
type: "select",
headerAlign: "center",
align: "center",
dicData: [
],
dicData: [],
props: {
label: "label",
value: "value",
@ -94,33 +112,25 @@ export default {
return "无";
}
return value;
}
},
},
{
label: '图片',
prop: 'picture',
type: 'upload',
label: "图片",
prop: "picture",
type: "upload",
headerAlign: "center",
align: "center",
loadText: "图片上传中,请稍等",
span: 12,
tip: "只能上传jpg/png文件",
// rules: [{
// required: true,
// message: "",
// trigger: "change",
// }],
formatter: (row, column) => {
const value = row.picture;
if (value === null || value === undefined || value === "") {
return "无"
}
return value;
},
onSuccess: (res, file, fileList) => {
this.form.picture = res.data
},
httpRequest: this.handleUpload
hide: true,
httpRequest: this.handleUpload,
},
{
label: "图片",
prop: "pictureImg",
span: 12,
display: false,
},
],
},
@ -135,16 +145,20 @@ export default {
this.fetchMaterialCode();
},
methods: {
uploadAfter(res, done, loading, column) {
console.log("上传成功", res, done, loading, column);
},
handleUpload(params) {
const formData = new FormData()
formData.append('file', params.file)
const formData = new FormData();
formData.append("file", params.file);
upload(formData)
.then(res => {
params.onSuccess(res)
})
.catch(err => {
params.onError(err)
.then((res) => {
this.form.picture = res.data.message;
params.onSuccess(res);
})
.catch((err) => {
params.onError(err);
});
},
fetchMaterialCode() {
getCode()
@ -152,17 +166,17 @@ export default {
const dicData = res.data.result.map((item) => ({
label: item.name,
value: item.code,
}))
}));
const targetColumn = this.option.column.find(
(col) => col.prop === "materialCode"
)
);
if (targetColumn) {
targetColumn.dicData = dicData
targetColumn.dicData = dicData;
}
})
.catch((error) => {
this.$message.error("加载类别数据失败,请刷新重试");
})
});
},
handleLog() {
this.dialogLogVisible = true;
@ -219,7 +233,7 @@ export default {
window.console.log(error);
loading();
}
)
);
},
//
rowUpdate(row, index, done, loading) {

Loading…
Cancel
Save