Commit b8d5afd5 authored by 徐来柯's avatar 徐来柯

update

parent fb397017
......@@ -8,7 +8,7 @@
<template>
<div class="lineBox">
<div class="LineCenten">
<Head type="8"></Head>
<Head type="8" ref="head" @searchQuery="query"></Head>
<div class="conterFool_middle" style="width:98%;margin:auto">
<el-table
border
......@@ -32,7 +32,7 @@
<el-table-column
label="生产排程编号"
:show-overflow-tooltip="true"
prop="SID"
prop="PlanID"
width="140">
</el-table-column>
<el-table-column
......@@ -44,55 +44,55 @@
<el-table-column
label="产品编号"
:show-overflow-tooltip="true"
prop="ProductType"
prop="PlanType"
width="140">
</el-table-column>
<el-table-column
label="产品名称"
:show-overflow-tooltip="true"
prop="PlanType"
prop="ProductName"
width="140">
</el-table-column>
<el-table-column
label="产品描述"
:show-overflow-tooltip="true"
prop="PlanType"
prop="CPdesc"
width="140">
</el-table-column>
<el-table-column
label="单位"
:show-overflow-tooltip="true"
prop="PlanType"
prop="ProductType"
width="140">
</el-table-column>
<el-table-column
label="计划交货日期"
:show-overflow-tooltip="true"
prop="LineName"
prop="DeliveryDt"
width="140">
</el-table-column>
<el-table-column
label="排程数量"
:show-overflow-tooltip="true"
prop="UserName"
prop="Quantity"
width="140">
</el-table-column>
<el-table-column
label="线体编号"
:show-overflow-tooltip="true"
prop="StartDt"
prop="LineID"
width="140">
</el-table-column>
<el-table-column
label="线体名称"
:show-overflow-tooltip="true"
prop="EndDt"
prop="LineName"
width="140">
</el-table-column>
<el-table-column
label="操作员"
:show-overflow-tooltip="true"
prop="Quantity"
prop="UserName"
width="80">
</el-table-column>
<el-table-column
......@@ -145,10 +145,10 @@
</div>
</div>
</div>
<SchedulingPop :typePop='type' :data='editData' v-if="popShow" @openRelate="openRelate" ></SchedulingPop>
<SchedulingPop :typePop='type' ref="linePop" :data='editData' v-if="popShow" @openRelate="openRelate" ></SchedulingPop>
<deletePop ref="delete" :deletetext="deletetext" v-if="deleteShow" :pathE="pathE" :type="typeV"></deletePop>
<div v-if="popShow || deleteShow" class="box"></div>
<relate-dialog v-if="relateShow" @closeDialog="closeDialog" />
<relate-dialog v-if="relateShow" :relateType="relateType" @conserve="saveData" @closeDialog="closeDialog" />
</div>
</template>
......@@ -189,22 +189,30 @@ export default {
typeV:'',
pathE:'',
relateShow: false,
relateType: '',
}
},
created(){
this.query()
var postData = {
argKeyWord: '',
argWhere: '',
Stime: this.$moment().format('YYYY-MM-DD 00:00:00'),
Etime: this.$moment().format('YYYY-MM-DD 23:59:59')
}
this.query(postData)
},
methods:{
//查询
query(){
query(keyWord){
this.$axios({
method:"post",
url:`/api/Schedule/Schedule_Query?argKeyWord=${this.argKeyWord}&&argID=${this.argID}`,
url:`/api/Schedule/Schedule_Query?argKeyWord=${ keyWord.argKeyWord }&argWhere=${ keyWord.argWhere }&Stime=${ keyWord.Stime }&Etime=${ keyWord.Etime }`,
}).then((res)=>{
if(res.data.data.length != 0 ){
for(let i=0;i<res.data.data.length;i++){
res.data.data[i].StartDt = this.$moment(res.data.data[i].StartDt).format('YYYY-MM-DD HH:mm:ss')
res.data.data[i].EndDt = this.$moment(res.data.data[i].EndDt).format('YYYY-MM-DD HH:mm:ss')
res.data.data[i].DeliveryDt = this.$moment(res.data.data[i].DeliveryDt).format('YYYY-MM-DD HH:mm:ss')
if(res.data.data[i].StartDt == 'Invalid date'){
res.data.data[i].StartDt = ''
}
......@@ -231,8 +239,13 @@ export default {
console.log('err',err)
})
},
openRelate () {
// 保存变量
saveData (data, type) {
this.$refs.linePop[type] = data.Name
this.relateShow = false
},
openRelate (type) {
this.relateType = type
this.relateShow = true
},
closeDialog () {
......@@ -240,6 +253,7 @@ export default {
},
//添加接口
addFun2(data){
var $this = this
this.$axios({
method:"post",
url:`/api/Schedule/Schedule_WindowAddSave`,//添加
......@@ -254,7 +268,13 @@ export default {
this.cancelFun()
}
this.deletetext = res.data.msg
this.query()
var postData = {
argKeyWord: $this.$refs.head.input,
argWhere: $this.$refs.head.argWhere,
Stime: $this.$refs.head.dateValue ? $this.moment(this.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : '',
Etime: $this.$refs.head.dateValue ? $this.moment(this.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ''
}
$this.query(postData)
}).catch(function(err){
console.log('err',err)
})
......@@ -283,6 +303,7 @@ export default {
},
//编辑
A_editFun(value){
var $this = this
let data = value
console.log('aa',JSON.stringify(data))
this.$axios({
......@@ -298,7 +319,13 @@ export default {
this.cancelFun()
}
this.deletetext = res.data.msg
this.query()
var postData = {
argKeyWord: $this.$refs.head.input,
argWhere: $this.$refs.head.argWhere,
Stime: $this.$refs.head.dateValue ? $this.moment(this.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : '',
Etime: $this.$refs.head.dateValue ? $this.moment(this.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ''
}
$this.query(postData)
}).catch(function(err){
console.log('err',err)
})
......@@ -482,13 +509,20 @@ export default {
},
//暂停
zantin(data){
var $this = this
console.log('data==>9暂停',data)
var argID = data.ID
this.$axios({
method:"post",
url:`/api/Schedule/Schedule_Stop?argID=${argID}`,
}).then((res)=>{
this.query()
var postData = {
argKeyWord: $this.$refs.head.input,
argWhere: $this.$refs.head.argWhere,
Stime: $this.$refs.head.dateValue ? $this.moment(this.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : '',
Etime: $this.$refs.head.dateValue ? $this.moment(this.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ''
}
$this.query(postData)
this.pageFun(this.PageIndex)
})
},
......@@ -563,11 +597,18 @@ export default {
//下发
xiafa(data){
var argID = data.ID
var $this = this
this.$axios({
method:"post",
url:`/api/Schedule/Schedule_Download?argID=${argID}`,
}).then((res)=>{
this.query()
var postData = {
argKeyWord: $this.$refs.head.input,
argWhere: $this.$refs.head.argWhere,
Stime: $this.$refs.head.dateValue ? $this.moment(this.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : '',
Etime: $this.$refs.head.dateValue ? $this.moment(this.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ''
}
$this.query(postData)
this.pageFun(this.PageIndex)
}).catch(function(err){
console.log('err',err)
......@@ -627,11 +668,18 @@ export default {
},
//移动接口
A_MoveFun(id1,id2,text){
var $this = this
this.$axios({
method:"post",
url:`/api/Schedule/Schedule_Move?argID1=${id1}&&argID2=${id2}`,
}).then((res)=>{
this.query()
var postData = {
argKeyWord: $this.$refs.head.input,
argWhere: $this.$refs.head.argWhere,
Stime: $this.$refs.head.dateValue ? $this.moment(this.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : '',
Etime: $this.$refs.head.dateValue ? $this.moment(this.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ''
}
$this.query(postData)
}).catch((err) =>{
this.typeV = '7'
this.deleteShow = true
......
......@@ -199,7 +199,6 @@ export default {
},
// 保存变量
saveData (data, type) {
debugger
this.$refs.linePop[type] = data.Name
this.relateShow = false
},
......
......@@ -16,12 +16,12 @@
<div class="centen_row">
<span class="centen_row_text">生产计划编号:</span>
<div class="centen_row_select">
<el-select @change="orderFun()" v-model="value" placeholder="请选择">
<el-select @change="orderFun()" v-model="PlanID" placeholder="请选择">
<el-option
v-for="item in planArr"
:key="item.PlanType"
:label="item.PlanType"
:value="item.PlanType">
:key="item.ID"
:label="item.ProductName"
:value="item.ID">
</el-option>
</el-select>
</div>
......@@ -29,12 +29,12 @@
<div class="centen_row" style="margin-top: 10px" >
<span class="centen_row_text" style="margin-left: 30px" >线体编号:</span>
<div class="centen_row_select">
<el-select @change="orderFun()" v-model="value" placeholder="请选择">
<el-select @change="orderFun()" v-model="LineID" placeholder="请选择">
<el-option
v-for="item in planArr"
:key="item.PlanType"
:label="item.PlanType"
:value="item.PlanType">
v-for="item in lineList"
:key="item.Name"
:label="item.Name"
:value="item.ID">
</el-option>
</el-select>
</div>
......@@ -42,12 +42,12 @@
<div class="centen_row" style="margin-top:10px">
<span class="centen_row_text" style="margin-left: 30px" >操作员:</span>
<div class="centen_row_select">
<el-select v-model="value1" placeholder="请选择">
<el-select v-model="UserName" placeholder="请选择">
<el-option
v-for="item in LineArr"
:key="item.LineName"
:label="item.LineName"
:value="item.LineName">
v-for="item in renArr"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
</div>
......@@ -55,20 +55,14 @@
<div class="centen_row" style="margin-top:10px">
<span class="centen_row_text" style="margin-left: 30px" >排程数量:</span>
<div class="centen_row_select">
<el-select v-model="value3" placeholder="请选择">
<el-option
v-for="item in renArr"
:key="item.UserName"
:label="item.UserName"
:value="item.UserName">
</el-option>
</el-select>
<input v-model="Quantity" class="schedule_input"/>
</div>
</div>
<div class="centen_row" style="margin-top:10px">
<span class="centen_row_text" >线体状态信号:</span>
<span @click="openRelate" class="relateBtn" >。 。 。</span>
<input v-model="LinVar" disabled class="line_input"/>
<span @click="openRelate('LinVar')" class="relateBtn" >选 择</span>
</div>
</div>
......@@ -84,18 +78,22 @@
export default {
data() {
return {
value: '',
value1:'',
value3:'',
num:'',
titleText:'',
lineList: [],
planArr:[],
LineArr:[],
renArr:[],
valuedata:[],
editDataArr:[]
editDataArr:[],
LinVar: '',
PlanID: '',
LineID: '',
UserName: '',
Quantity: '',
}
},
props:['typePop','data'],
......@@ -110,10 +108,11 @@ export default {
url:`/api/Schedule/Schedule_WindowQuery?argID=${id}`,
}).then((res)=>{
this.editDataArr = res.data.data
this.value = res.data.data.PlanType
this.value1 = res.data.data.LineName
this.value3 = res.data.data.UserName
this.num = res.data.data.Quantity
this.PlanID = res.data.data.PlanID
this.LineID = res.data.data.LineID
this.UserName = res.data.data.UserName
this.Quantity = res.data.data.Quantity
this.LinVar = res.data.data.LinVar
}).catch(function(err){
console.log('err',err)
......@@ -124,6 +123,7 @@ export default {
this.queryPlan()
this.queryLine()
this.queryRen()
this.getLines()
},
directives: {
drag: function(el) {
......@@ -152,31 +152,25 @@ export default {
methods:{
//查询生产订单
queryPlan(){
var value = ''
var id = '00000000-0000-0000-0000-000000000000'
this.$axios({
method:"post",
url:`/api/Plan/Plan_Query?argKeyWord=${value}&&argID=${id}`,
url:`/api/Plan/Plan_Query?argKeyWord&argWhere&Stime&Etime`,
}).then((res)=>{
this.planArr = []
for(let i=0;i<res.data.data.length;i++){
var value = {
ProductID:res.data.data[i].ProductID,//产品id
ProductName:res.data.data[i].ProductName,//产品名称
ProductType:res.data.data[i].ProductType,//产品型号
PlanID:res.data.data[i].ID,//计划id
PlanType:res.data.data[i].PID,//订单编号
Status:res.data.data[i].Status
}
this.planArr.push(value)
}
this.planArr = res.data.data
}).catch(function(err){
console.log('err',err)
})
},
openRelate () {
this.$emit('openRelate')
getLines () {
this.$axios({
method:"post",
url:`/api/MaterialDelivery/MaterialDelivery_LinesData`,
}).then((res)=>{
this.lineList = res.data.data
})
},
openRelate (type) {
this.$emit('openRelate', type)
},
//订单选择
orderFun(){
......@@ -232,14 +226,7 @@ export default {
method:"post",
url:`/api/Schedule/Schedule_WindowUserQuery`,
}).then((res)=>{
this.renArr = []
for(let i=0;i<res.data.data.length;i++){
var value = {
ID:res.data.data[i],
UserName:res.data.data[i],
}
this.renArr.push(value)
}
this.renArr = res.data.data
}).catch(function(err){
console.log('err',err)
})
......@@ -286,10 +273,13 @@ export default {
NO:'1',
ID:id,
SID:timeid,
UserName:this.value3,
Quantity:this.Quantity,
UserName:this.UserName,
LineID: this.LineID,
PlanID: this.PlanID,
LinVar: this.LinVar,
StartDt:'',
EndDt:'',
Quantity:this.num
}
for(let i=0;i<this.planArr.length;i++){
if(this.value == this.planArr[i].PlanType){
......@@ -330,6 +320,15 @@ export default {
}
</style>
<style lang="scss" scoped>
.line_input {
height: 40px;
width: 214px;
margin-left: 32px;
}
.schedule_input {
height: 40px;
width: 310px
}
.scPopBox{
width:820px;
height:550px;
......@@ -373,7 +372,7 @@ export default {
width: 75px;
height: 40px;
display: inline-block;
margin-left: 32px;
margin-left: 20px;
text-align: center;
line-height: 40px;
cursor: pointer;
......@@ -386,7 +385,6 @@ export default {
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(51,51,51,1);
margin-right: 20px;
}
.popCenten{
width:737px;
......
......@@ -43,7 +43,7 @@
<el-input type="text" @input="inputchargeFun()" v-model="input" :placeholder="placeText"></el-input>
</div>
<div>
<div v-if="type=== '10'" class="bottom" @click="searchQuery" >查询</div>
<div v-if="type=== '10' || type === '8'" class="bottom" @click="searchQuery" >查询</div>
<div class="bottom" v-else @click="query()">查询</div>
</div>
<div v-if="type == 9" class="add xy">
......@@ -90,14 +90,14 @@ export default {
},
props:['type'],
created(){
if(this.type=='6' || this.type=='8'){
if(this.type=='6'){
this.placeText = '请输入关键字'
this.headText='产品名称'
this.queryProduct()
}else if(this.type==9){
this.placeText = '请输入关键字'
this.headText='设备名称'
}else if(this.type==='10' || this.type ==='11' || this.type === '12'){
}else if(this.type==='10' || this.type ==='11' || this.type === '12' || this.type=='8'){
this.placeText = '请输入关键字'
if (this.type==='10') {
this.productNameArr = [
......@@ -149,6 +149,41 @@ export default {
name: '线体名称'
}
]
} else if (this.type === '8') {
this.productNameArr = [
{
id: '不限',
name: ' '
},
{
id: '生产排程编号',
name: '生产排程编号'
},
{
id: '产品编号',
name: '产品编号'
},
{
id: '产品名称',
name: '产品名称'
},
{
id: '产品描述',
name: '产品描述'
},
{
id: '计划交货日期',
name: '计划交货日期'
},
{
id: '操作员',
name: '操作员'
},
{
id: '生产排程状态',
name: '生产排程状态'
}
]
}
}else{
this.placeText = '请输入名称'
......
......@@ -268,7 +268,7 @@ export default {
return
}
}
if (this.relateType === 'VStatus') {
if (this.relateType === 'VStatus' || this.relateType === 'LinVar' ) {
if (this.currentRow.DateType.indexOf('二进制') !== -1) {
return this.$emit('conserve', this.currentRow, this.relateType)
} else {
......
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