Commit 6bcd53fc authored by 徐来柯's avatar 徐来柯

update

parent b8d5afd5
...@@ -131,6 +131,8 @@ const Materialinventory = () => ...@@ -131,6 +131,8 @@ const Materialinventory = () =>
import('@/views/education/materialinventory.vue') import('@/views/education/materialinventory.vue')
const ProductHouseshow = () => const ProductHouseshow = () =>
import('@/views/education/ProductHouseshow.vue') import('@/views/education/ProductHouseshow.vue')
const SchedulingStatistics = () =>
import('@/views/education/schedulingStatistics.vue')
Vue.use(VueRouter); Vue.use(VueRouter);
...@@ -369,6 +371,10 @@ const routes = [{ ...@@ -369,6 +371,10 @@ const routes = [{
path: '/ProductHouseshow', path: '/ProductHouseshow',
component: ProductHouseshow component: ProductHouseshow
}, },
{
path: '/SchedulingStatistics',
component: SchedulingStatistics
},
{ {
path: '/*', path: '/*',
component: CustomerVue component: CustomerVue
......
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
if(res.data.data.length != 0 ){ if(res.data.data.length != 0 ){
this.AllTableData = res.data.data.map(item => ({ this.AllTableData = res.data.data.map(item => ({
...item, ...item,
UpdateTime: this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') UpdateTime: item.UpdateTime ? this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') : ''
})) }))
this.cloneData= JSON.parse(JSON.stringify(this.AllTableData)) this.cloneData= JSON.parse(JSON.stringify(this.AllTableData))
if(this.AllTableData.length > this.$refs.page.pageSize){ if(this.AllTableData.length > this.$refs.page.pageSize){
......
...@@ -161,7 +161,7 @@ export default { ...@@ -161,7 +161,7 @@ export default {
if(res.data.data.length != 0 ){ if(res.data.data.length != 0 ){
this.AllTableData = res.data.data.map(item => ({ this.AllTableData = res.data.data.map(item => ({
...item, ...item,
UpdateTime: this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') UpdateTime: item.UpdateTime ? this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') : ''
})) }))
// 克隆一份tableData数据 // 克隆一份tableData数据
this.cloneData= JSON.parse(JSON.stringify(this.AllTableData)) this.cloneData= JSON.parse(JSON.stringify(this.AllTableData))
......
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
if(res.data.data.length != 0 ){ if(res.data.data.length != 0 ){
this.AllTableData = res.data.data.map(item => ({ this.AllTableData = res.data.data.map(item => ({
...item, ...item,
UpdateTime: this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') UpdateTime: item.UpdateTime ? this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') : ''
})) }))
// 克隆一份tableData数据 // 克隆一份tableData数据
this.cloneData= JSON.parse(JSON.stringify(this.AllTableData)) this.cloneData= JSON.parse(JSON.stringify(this.AllTableData))
......
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
if(res.data.data.length != 0 ){ if(res.data.data.length != 0 ){
this.AllTableData = res.data.data.map(item => ({ this.AllTableData = res.data.data.map(item => ({
...item, ...item,
UpdateTime: this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') UpdateTime: item.UpdateTime ? this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') : ''
})) }))
// 克隆一份tableData数据 // 克隆一份tableData数据
this.cloneData= JSON.parse(JSON.stringify(this.AllTableData)) this.cloneData= JSON.parse(JSON.stringify(this.AllTableData))
......
...@@ -163,7 +163,7 @@ export default { ...@@ -163,7 +163,7 @@ export default {
if(res.data.data.length != 0 ){ if(res.data.data.length != 0 ){
this.AllTableData = res.data.data.map(item => ({ this.AllTableData = res.data.data.map(item => ({
...item, ...item,
UpdateTime: this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') UpdateTime: item.UpdateTime ? this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') : ''
})) }))
// 克隆一份tableData数据 // 克隆一份tableData数据
this.cloneData= JSON.parse(JSON.stringify(this.AllTableData)) this.cloneData= JSON.parse(JSON.stringify(this.AllTableData))
......
...@@ -185,7 +185,7 @@ export default { ...@@ -185,7 +185,7 @@ export default {
if(res.data.data.length != 0 ){ if(res.data.data.length != 0 ){
this.AllTableData = res.data.data.DataList.map(item => ({ this.AllTableData = res.data.data.DataList.map(item => ({
...item, ...item,
UpdateTime: this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') UpdateTime: item.UpdateTime ? this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') : ''
})) }))
// 克隆一份tableData数据 // 克隆一份tableData数据
this.cloneData= JSON.parse(JSON.stringify(this.AllTableData)) this.cloneData= JSON.parse(JSON.stringify(this.AllTableData))
......
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
if(res.data.data.length != 0 ){ if(res.data.data.length != 0 ){
this.AllTableData = res.data.data.map(item => ({ this.AllTableData = res.data.data.map(item => ({
...item, ...item,
UpdateTime: this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') UpdateTime: item.UpdateTime ? this.$moment(item.UpdateTime).format('YYYY-MM-DD HH:mm:ss') : ''
})) }))
// 克隆一份tableData数据 // 克隆一份tableData数据
this.cloneData= JSON.parse(JSON.stringify(this.AllTableData)) this.cloneData= JSON.parse(JSON.stringify(this.AllTableData))
......
<template>
<div class="box-container">
<div class="wrap">
<search-form :formList="[1,2]" :searchList="searchList" :formData="formData" @scanGunCode="scanGunCode" @searchData="searchData" @openDialog="openDialog" @delData="delData" />
<el-table
border
height="675"
ref="multipleTable"
:data="tableData"
class="table-style"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="60">
</el-table-column>
<el-table-column
label="序号"
:show-overflow-tooltip="true"
width="80"
prop="NO">
</el-table-column>
<el-table-column
label="生产计划编号"
:show-overflow-tooltip="true"
prop="PlanID"
width="180">
</el-table-column>
<el-table-column
prop="ProductID"
label="产品编号"
:show-overflow-tooltip="true"
width="180">
</el-table-column>
<el-table-column
label="产品名称"
:show-overflow-tooltip="true"
prop="ProductName"
width="180">
</el-table-column>
<el-table-column
label="产品描述"
:show-overflow-tooltip="true"
prop="Prodescribe"
width="180">
</el-table-column>
<el-table-column
label="单位"
:show-overflow-tooltip="true"
prop="Prounit"
width="180">
</el-table-column>
<el-table-column
label="计划交货日期"
:show-overflow-tooltip="true"
prop="DeliveryDt"
width="210">
</el-table-column>
<el-table-column
label="计划数量"
:show-overflow-tooltip="true"
prop="PlanQuantity"
width="140">
</el-table-column>
<el-table-column
label="排程数量"
:show-overflow-tooltip="true"
prop="ScheduleQuantity"
width="180">
</el-table-column>
<el-table-column
label="完工数量"
:show-overflow-tooltip="true"
prop="FinishQuantity"
width="180">
</el-table-column>
<el-table-column
label="实际完工日期"
:show-overflow-tooltip="true"
prop="EndDt"
width="180"
>
</el-table-column>
<el-table-column
label="生产计划状态"
:show-overflow-tooltip="true"
prop="TextStatus"
width="180">
</el-table-column>
</el-table>
<Pagination ref="page" :totalCount="totalCount" :totalPage="totalPage" @pageFun="pageFun" />
</div>
<store-dialog :titleText="'产品入库单'" :titleType="'pro'" v-if="popShow" @closeDialog="closeDialog" @conserve="conserve" />
<delete-pop ref="delete" :deletetext="deletetext" :type="typeV" v-if="deleteShow"></delete-pop>
</div>
</template>
<script>
import searchForm from './component/searchForm'
import storeDialog from './component/storeDialog'
import deletePop from './component/deletePop'
import Pagination from './component/Pagination.vue'
export default {
components: { searchForm, storeDialog, deletePop, Pagination },
data () {
return {
tableData: [],
AllTableData: [],
cloneData: [],
popShow: false,
checkList: [],
searchList: [
{
id: '不限',
name: ''
},
{
id: '生产计划编号',
name: '生产计划编号'
},
{
id: '产品编号',
name: '产品编号'
},
{
id: '产品名称',
name: '产品名称'
},
{
id: '产品描述',
name: '产品描述'
},
{
id: '计划交货日期',
name: '计划交货日期'
},
{
id: '实际完工日期',
name: '实际完工日期'
},
{
id: '生产计划状态',
name: '生产计划状态'
},
],
deletetext: '',
deleteShow: false,
typeV: '',
formData: {
argKeyWord: '',
argWhere: '',
dateValue: [this.$moment().format('YYYY-MM-DD 00:00:00'), this.$moment().format('YYYY-MM-DD 23:59:59')],
scanValue: '',
},
// 分页数据
totalCount: 0,
// pageIndex: 1,
totalPage: 1
}
},
created() {
this.searchData()
},
methods: {
searchData () {
var $this = this
var postData = this.resetData()
this.$axios({
method:"post",
url:`/api/TJStatistics/Statistics_Query?argKeyWord=${postData.argKeyWord}&argWhere=${postData.argWhere}&Stime=${postData.Stime}&Etime=${postData.Etime}`,
}).then((res)=>{
if(res.data.data.length != 0 ){
this.AllTableData = res.data.data.map(item => ({
...item,
DeliveryDt: item.DeliveryDt ? this.$moment(item.DeliveryDt).format('YYYY-MM-DD HH:mm:ss') : '',
EndDt: item.EndDt ? this.$moment(item.EndDt ).format('YYYY-MM-DD HH:mm:ss') : ''
}))
// 克隆一份tableData数据
this.cloneData= JSON.parse(JSON.stringify(this.AllTableData))
if(this.AllTableData.length > this.$refs.page.pageSize){
this.tableData = this.AllTableData.slice(0, this.$refs.page.pageSize)
}else{
this.tableData = this.AllTableData
}
this.totalCount = this.AllTableData.length
// this.pageIndex = 1
this.totalPage = Math.ceil(this.AllTableData.length / this.$refs.page.pageSize)
}else{
this.tableData = []
this.totalCount = 0
// this.pageIndex = 1
this.totalPage = 1
}
this.pageFun(1)
}).catch(function(err){
console.log('err',err)
})
},
handleSelectionChange (val) {
this.checkList = val
},
// 分页方法
pageFun(num){
if(num == 1){
this.tableData = this.cloneData.slice(0, this.$refs.page.pageSize)
}else{
this.tableData = this.cloneData.slice((num-1)*this.$refs.page.pageSize,this.$refs.page.pageSize*num)
}
},
// 扫码枪扫码
scanGunCode(value) {
console.log('开始扫码。。。')
this.$axios({
method:"post",
url:`/api/ProductStorage/ProductStorage_ScanCodeAdd?ScanCode=${value}`,
}).then((res)=>{
console.log('扫码成功。。。')
var postData = {
argKeyWord: this.formData.argKeyWord,
argWhere: this.formData.argWhere,
Stime: this.formData.dateValue ? this.$moment(this.formData.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : '',
Etime: this.formData.dateValue ? this.$moment(this.formData.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ''
}
this.searchData(this.postData)
}).catch(() => {
console.log('扫码失败。。。')
})
},
resetData () {
return {
argKeyWord: this.formData.argKeyWord,
argWhere: this.formData.argWhere,
Stime: this.formData.dateValue ? this.$moment(this.formData.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : '',
Etime: this.formData.dateValue ? this.$moment(this.formData.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ''
}
},
delData () {
var $this = this
if ($this.checkList.length === 0) {
$this.deleteShow = true
$this.typeV = 2
} else {
var list = []
$this.checkList.forEach((item) => {
list.push(item.ID)
})
$this.$axios({
method:"post",
url:`/api/ProductStorage/ProductStorage_Delete`,
data:list
}).then((res)=>{
var postData = $this.resetData()
$this.searchData(postData)
})
}
},
//关闭提示弹窗
cancel_delete(){
this.deleteShow = false
},
openDialog () {
this.popShow = true
},
closeDialog () {
this.popShow = false
},
conserve (data) {
var $this = this
this.$axios({
method:"post",
url:`/api/ProductStorage/ProductStorage_WindowAddSave`,
data:data
}).then((res)=>{
if(res.data.code != 0){
$this.typeV = '5'
$this.deleteShow = true
}else{
$this.typeV = '6'
$this.popShow = false
}
$this.deletetext = res.data.msg
var postData = $this.resetData()
$this.searchData(postData)
}).catch(function(err){
console.log('err',err)
})
}
}
}
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment