Browse Source

订单管理的状态增加颜色背景区分,供应商门户增加订单解析页面,需求批次,需求明细优化

pull/6/head
wangxy 3 years ago
parent
commit
e7cbf825d4
10 changed files with 275 additions and 23 deletions
  1. +1
    -0
      .env.staging
  2. +8
    -0
      src/api/productplan/base.js
  3. +38
    -0
      src/styles/index.scss
  4. +16
    -5
      src/styles/variables.scss
  5. +30
    -10
      src/views/productplan/workbench/order.vue
  6. +2
    -2
      src/views/supplier/batch/exportTem.vue
  7. +2
    -2
      src/views/supplier/batch/handler.vue
  8. +2
    -2
      src/views/supplier/detail/exportTem.vue
  9. +2
    -2
      src/views/supplier/detail/handler.vue
  10. +174
    -0
      src/views/supplier/orderParse.vue

+ 1
- 0
.env.staging View File

@ -5,3 +5,4 @@ NODE_ENV = 'production'
# base api
VUE_APP_BASE_API = 'http://101.201.121.115:8093'
# VUE_APP_BASE_API = 'http://101.201.121.115:8097'

+ 8
- 0
src/api/productplan/base.js View File

@ -41,6 +41,14 @@ export function getWorkorder (query) {
})
}
// 根据物料ID查询所需数据
export function getArticleData (query) {
return request({
url: '/admin/base/article/get/' + query,
method: 'get'
})
}
// 新增
export function addWorkorder (data) {
return request({


+ 38
- 0
src/styles/index.scss View File

@ -246,4 +246,42 @@ aside {
.el-table th.gutter{
display: table-cell!important;
}
// 最新
.not-plan-bg{ // 未计划
background:$not-plan !important;
color: #fff;
}
.in-production-bg{ //生产中执行中
background:$in-production !important;
color: #fff;
}
.has-issued-bg{//已下达
background:$has-issued !important;
color: #fff;
}
.has-plan-bg{//已计划
background:$has-plan !important;
color: #fff;
}
.has-complete-bg{//已完成
background:$has-complete !important;
color: #fff;
}
.has-lock-bg{//已锁定
background:$has-lock !important;
color: #fff;
}
.has-cancel-bg{//已取消
background:$has-cancel !important;
color: #fff;
}
.has-shipment-bg{//已发运
background:$has-shipment !important;
color: #fff;
}
.interrupt-bg{//中断
background:$interrupt !important;
color: #fff;
}

+ 16
- 5
src/styles/variables.scss View File

@ -1,3 +1,14 @@
// 最新定义颜色
$not-plan: #E1B14E; // 未计划
$in-production: #BFD732; // 生产中执行中
$has-issued: #26B8A1; // 已下达
$has-plan: #518AD4; // 已计划
$has-complete: #B4B4B4; // 已完成
$has-lock: #3FA5C4; // 已锁定
$has-cancel: #9172CE; // 已取消
$has-shipment: #C98865; // 已发运
$interrupt: #DC605C; // 中断
// base color
$blue:#324157;
$light-blue:#3A71A8;
@ -8,11 +19,11 @@ $tiffany: #4AB7BD;
$yellow:#FEC171;
$panGreen: #30B08F;
$error:#FF6347;
$unKnow:#C0C0C0;
$wait:#3C81FF;
$process:#FFC825;
$complete:#2AC6AE;
$error:#C03639;
$unKnow:#B4B4B4;
$wait:#324157;
$process:#FEC171;
$complete:#30B08F;
// sidebar
// $menuText:#bfcbd9;


+ 30
- 10
src/views/productplan/workbench/order.vue View File

@ -78,7 +78,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dataList" border>
<el-table-column v-for="(item, index) in headers" :key="index" :label="getColumnName(item)" :show-overflow-tooltip="true" width="156px">
<el-table-column v-for="(item, index) in headers" :key="index" :label="getColumnName(item)" :show-overflow-tooltip="true" align="center" width="156px">
<template slot-scope="scope">
<span v-if="item === 'OM_WorkOrder-PlantNr'">{{ getValue(scope.row['OM_WorkOrder-PlantNr']) }}</span>
<div v-else-if="item === 'OM_WorkOrder-LastModify'"> {{ parseTime(scope.row[item]) }} </div>
@ -87,7 +87,17 @@
<div v-else-if="item === 'OM_WorkOrder-PlanEndTime'"> {{ parseTime(scope.row[item]) }} </div>
<div v-else-if="item === 'OM_WorkOrder-ActStartTime'"> {{ parseTime(scope.row[item]) }} </div>
<div v-else-if="item === 'OM_WorkOrder-ActEndTime'"> {{ parseTime(scope.row[item]) }} </div>
<div v-else-if="item === 'OM_WorkOrderStatus-Status'"> {{ fieldTrans(scope.row[item]) }} </div>
<div v-else-if="item === 'OM_WorkOrderStatus-Status'"
:class="['bg-div',{'not-plan-bg':scope.row[item] == 10},
{'has-plan-bg':scope.row[item] == 20},
{'has-lock-bg':scope.row[item] == 24},
{'has-issued-bg':scope.row[item] == 26},
{'interrupt-bg':scope.row[item] == 39},
{'in-production-bg':scope.row[item] == 40},
{'has-complete-bg':scope.row[item] == 80},
{'has-shipment-bg':scope.row[item] == 90},
{'has-lock-bg': scope.row[item] == 95},
{'has-cancel-bg': scope.row[item] == 98}]"> {{ fieldTrans(scope.row[item]) }} </div>
<div v-else-if="item === 'OM_WorkOrder-OrderType'"> {{ orderTypeTrans(scope.row[item]) }} </div>
<span v-else>{{ scope.row[item] }}</span>
</template>
@ -129,11 +139,11 @@
<el-dialog :title="title" :visible.sync="open" width="1000px">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row>
<el-col :span="12">
<!-- <el-col :span="12">
<el-form-item :label="getColumnName('OM_WorkOrder-WorkOrderId')" prop="OM_WorkOrder-WorkOrderId">
<el-input v-model="form['OM_WorkOrder-WorkOrderId']" :disabled="!isAdd" placeholder="请输入" />
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="12">
<el-form-item :label="getColumnName('OM_WorkOrder-OrderType')" prop="OM_WorkOrder-OrderType">
<el-select v-model="form['OM_WorkOrder-OrderType']" :disabled="!isAdd" style="width:100%;" filterable placeholder="请选择">
@ -148,7 +158,7 @@
</el-col>
<el-col :span="12">
<el-form-item :label="getColumnName('OM_WorkOrder-ArtId')" prop="OM_WorkOrder-ArtId">
<el-select v-model="form['OM_WorkOrder-ArtId']" :disabled="!isAdd" filterable placeholder="请选择" style="width:100%;">
<el-select v-model="form['OM_WorkOrder-ArtId']" @change="artIdChange" :disabled="!isAdd" filterable placeholder="请选择" style="width:100%;">
<el-option
v-for="item in articleArray"
:key="item['Article-ArtId']"
@ -177,7 +187,7 @@
</el-col>
<el-col :span="12">
<el-form-item :label="getColumnName('OM_WorkOrder-PlanResourceId')" prop="OM_WorkOrder-PlanResourceId">
<el-select v-model="form['OM_WorkOrder-PlanResourceId']" style="width:100%;" filterable :disabled="!isAdd" placeholder="请选择">
<el-select v-model="form['OM_WorkOrder-PlanResourceId']" style="width:100%;" filterable disabled placeholder="请选择">
<el-option
v-for="(item, index) in workLineArray"
:key="index"
@ -189,7 +199,7 @@
</el-col>
<el-col :span="12">
<el-form-item :label="getColumnName('OM_WorkOrder-QuantityPerHour')">
<el-input v-model="form['OM_WorkOrder-QuantityPerHour']" :disabled="!isAdd" placeholder="请输入" />
<el-input v-model="form['OM_WorkOrder-QuantityPerHour']" disabled placeholder="请输入" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
@ -282,7 +292,8 @@ import {
delWorkorder,
undoWorkorder,
getArticleList,
getWorklineList
getWorklineList,
getArticleData
} from '@/api/productplan/base'
import { getWorkshopList } from '@/common/workshop'
import { deepCopy } from "@/common/timeCycle.js"
@ -361,6 +372,7 @@ export default {
this.headers = [
'OM_WorkOrder-PlantNr',
'OM_WorkOrder-WorkOrderId',
'OM_WorkOrderStatus-Status',
'OM_WorkOrder-ArtId',
'OM_WorkOrder-CustArtId',
'OM_WorkOrder-OrderType',
@ -372,7 +384,6 @@ export default {
'OM_WorkOrder-PlanEndTime',
'OM_WorkOrder-ActStartTime',
'OM_WorkOrder-ActEndTime',
'OM_WorkOrderStatus-Status',
'OM_WorkOrder-LastModify',
'OM_WorkOrder-LastUser',
'OM_WorkOrder-CreateTime'
@ -381,6 +392,12 @@ export default {
}
)
},
artIdChange(value) {
getArticleData(value).then(res => {
this.$set(this.form,'OM_WorkOrder-QuantityPerHour',res.data['Article-QuantityPerHour'])
this.$set(this.form,'OM_WorkOrder-PlanResourceId',res.data['Article-PlanResourceId'])
})
},
//
orderTypeTrans(value) {
if (this.orderTypeArray.length > 0) {
@ -573,5 +590,8 @@ export default {
</script>
<style lang="scss" scoped>
.bg-div {
height: 30px;
line-height: 30px;
}
</style>

+ 2
- 2
src/views/supplier/batch/exportTem.vue View File

@ -79,7 +79,7 @@
<span v-else-if="item === 'LOG_ArtDemandHead-DemandDate'">{{scope.row[item] | formatGrmiDate}}</span>
<div v-else-if="item === 'LOG_ArtDemandHead-UrgencyDegree'"
:class="['bg-div',{'error-bg':scope.row[item] == 2},{'process-bg':scope.row[item] == 1},{'complete-bg': scope.row[item] == 0}]">
<span v-if="scope.row[item] != 0">{{scope.row['LOG_ArtDemandHead-SurplusDays']}}</span>
<span>{{scope.row['LOG_ArtDemandHead-SurplusDays']}}</span>
</div>
<span v-else>{{scope.row[item]}}</span>
</template>
@ -194,7 +194,7 @@ export default {
'LOG_ArtDemandHead-DemandCloseTime',
'LOG_ArtDemandHead-DemandConfirmTime',
'LOG_ArtDemandHead-DemandRecieveTime',
'LOG_ArtDemandHead-DemandDeliveredQty',
'LOG_ArtDemandHead-DemandQty',
],
selectRow: [],
loading: true,


+ 2
- 2
src/views/supplier/batch/handler.vue View File

@ -81,7 +81,7 @@
<span v-else-if="item === 'LOG_ArtDemandHead-DemandDate'">{{scope.row[item] | formatGrmiDate}}</span>
<div v-else-if="item === 'LOG_ArtDemandHead-UrgencyDegree'"
:class="['bg-div',{'error-bg':scope.row[item] == 2},{'process-bg':scope.row[item] == 1},{'complete-bg': scope.row[item] == 0}]">
<span v-if="scope.row[item] != 0">{{scope.row['LOG_ArtDemandHead-SurplusDays']}}</span>
<span>{{scope.row['LOG_ArtDemandHead-SurplusDays']}}</span>
</div>
<span v-else>{{scope.row[item]}}</span>
</template>
@ -190,7 +190,7 @@ export default {
'LOG_ArtDemandHead-DemandCloseTime',
'LOG_ArtDemandHead-DemandConfirmTime',
'LOG_ArtDemandHead-DemandRecieveTime',
'LOG_ArtDemandHead-DemandDeliveredQty',
'LOG_ArtDemandHead-DemandQty',
],
selectRow: [],
loading: true,


+ 2
- 2
src/views/supplier/detail/exportTem.vue View File

@ -84,7 +84,7 @@
<span v-else-if="item === 'LOG_ArtDemandLst-DemandDate'">{{scope.row[item] | formatGrmiDate}}</span>
<div v-else-if="item === 'LOG_ArtDemandLst-UrgencyDegree'"
:class="['bg-div',{'error-bg':scope.row[item] == 2},{'process-bg':scope.row[item] == 1},{'complete-bg': scope.row[item] == 0}]">
<span v-if="scope.row[item] != 0">{{scope.row['LOG_ArtDemandLst-SurplusDays']}}</span>
<span>{{scope.row['LOG_ArtDemandLst-SurplusDays']}}</span>
</div>
<span v-else>{{scope.row[item]}}</span>
</template>
@ -194,7 +194,7 @@ export default {
'LOG_ArtDemandLst-DemandCloseTime',
'LOG_ArtDemandLst-DemandConfirmTime',
'LOG_ArtDemandLst-DemandRecieveTime',
'LOG_ArtDemandLst-DemandDeliveredQty',
'LOG_ArtDemandLst-DemandQty',
],
selectRow: [],
loading: true,


+ 2
- 2
src/views/supplier/detail/handler.vue View File

@ -89,7 +89,7 @@
<span v-else-if="item === 'LOG_ArtDemandLst-DemandDate'">{{scope.row[item] | formatGrmiDate}}</span>
<div v-else-if="item === 'LOG_ArtDemandLst-UrgencyDegree'"
:class="['bg-div',{'error-bg':scope.row[item] == 2},{'process-bg':scope.row[item] == 1},{'complete-bg': scope.row[item] == 0}]">
<span v-if="scope.row[item] != 0">{{scope.row['LOG_ArtDemandLst-SurplusDays']}}</span>
<span>{{scope.row['LOG_ArtDemandLst-SurplusDays']}}</span>
</div>
<span v-else>{{scope.row[item]}}</span>
</template>
@ -196,7 +196,7 @@ export default {
'LOG_ArtDemandLst-DemandCloseTime',
'LOG_ArtDemandLst-DemandConfirmTime',
'LOG_ArtDemandLst-DemandRecieveTime',
'LOG_ArtDemandLst-DemandDeliveredQty',
'LOG_ArtDemandLst-DemandQty',
],
selectRow: [],
loading: true,


+ 174
- 0
src/views/supplier/orderParse.vue View File

@ -0,0 +1,174 @@
<template>
<div class="app-container">
<el-form ref="queryForm" :model="queryParams" :inline="true">
<el-form-item>
<input
type="file"
accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, xls, xlsx"
@change="previewUpload"
>
<el-button
type="primary"
:loading="uploadLoading"
icon="el-icon-upload"
size="mini"
@click="uploadEvent"
>上传</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dataList" border>
<el-table-column v-for="(item, index) in headers" :key="index" :label="getColumnName(item)" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="item === 'OM_DemandHead-PlantNr'">{{ getValue(scope.row['OM_DemandHead-PlantNr']) }}</span>
<span v-else-if="item === 'OM_DemandHead-LastModify'"> {{ parseTime(scope.row[item]) }} </span>
<span v-else-if="item === 'OM_DemandHead-CreateTime'"> {{ parseTime(scope.row[item]) }} </span>
<span v-else-if="item === 'OM_DemandHead-Status'"> {{ fieldTrans(scope.row[item]) }} </span>
<span v-else>{{ scope.row[item] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="80" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
:disabled="scope.row['OM_DemandHead-Status'] === 1 || scope.row['OM_DemandHead-Status'] === 3 || scope.row['OM_DemandHead-Status'] === 5"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNumber"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getFieldList, delField, uploadExcel } from '@/api/productplan/base'
export default {
name: 'orderParse',
data() {
return {
//
dataList: [],
//
headers: [],
//
loading: true,
//
total: 0,
//
queryParams: {
pageNumber: 1,
pageSize: 10
},
uploadLoading: false,
excel: '',
orderStatusArray: []
}
},
created() {
this.getList()
this.getStanderOne({ statid: 'OM_OrderParse' }).then(res => {
this.orderStatusArray = res.data
})
},
methods: {
//
fieldTrans(value) {
if (this.orderStatusArray.length > 0) {
let fieldValue = ''
this.orderStatusArray.forEach(el => {
if (value === Number(el['stdeftab-stdeftyp'])) {
fieldValue = el['stdeftab-bez']
}
})
return fieldValue
}
},
/** 查询列表 */
getList() {
this.loading = true
getFieldList(this.queryParams).then(
response => {
this.dataList = response.data.records
this.total = response.data.count
this.headers = [
'OM_DemandHead-PlantNr',
'OM_DemandHead-FileNr',
'OM_DemandHead-FileName',
'OM_DemandHead-Status',
'OM_DemandHead-ErrorInfo',
'OM_DemandHead-ErrNum',
'OM_DemandHead-LastModify',
'OM_DemandHead-LastUser',
'OM_DemandHead-CreateTime'
]
this.loading = false
}
)
},
//
previewUpload(file) {
this.excle = file.target.files[0]
},
//
uploadEvent() {
this.uploadLoading = true
if (this.excle === null || this.excle === '') {
this.$message({
showClose: true,
duration: 2000,
message: '请选择文件',
type: 'error'
})
this.uploadLoading = false
} else {
const uploadData = new FormData()
uploadData.append('uploadfile', this.excle)
uploadExcel(uploadData).then(res => {
this.uploadLoading = false
if (res.code === 200) {
this.$message({
showClose: true,
duration: 2000,
message: 'submit success',
type: 'success'
})
this.getList()
} else {
this.$message({
showClose: true,
duration: 2000,
message: 'submit failed',
type: 'error'
})
}
}).catch(() => {
this.uploadLoading = false
})
}
},
/** 删除按钮操作 */
handleDelete(row) {
this.$confirm('是否确认删除' + row['OM_DemandHead-FileNr'] + '"的数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return delField(row['OM_DemandHead-FileNr'])
}).then(() => {
this.getList()
this.msgSuccess('删除成功')
}).catch(function() {})
}
}
}
</script>

Loading…
Cancel
Save