Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
4894b637d1
|
@ -450,6 +450,15 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
revert: {
|
||||||
|
name: "撤回",
|
||||||
|
req: async function (id, data) {
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/wpm/handover/${id}/revert/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
mgroups:{
|
mgroups:{
|
||||||
name: "获取可交接的工段",
|
name: "获取可交接的工段",
|
||||||
req: async function (data) {
|
req: async function (data) {
|
||||||
|
|
|
@ -143,9 +143,9 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-if="mTracking==20&&form.count>1&&(form.type == 'pur_in'||form.type == 'other_in')">
|
<el-row v-if="mTracking==20&&form.count>1&&(form.type == 'pur_in'||form.type == 'other_in')">
|
||||||
<el-col :md="12" :sm="24" v-for="i in form.count" :key="i">
|
<el-col :md="12" :sm="24" v-for="i in form.count" :key="i">
|
||||||
<el-form-item :label="'编号'+i">
|
<el-form-item :label="'编号'+i" required>
|
||||||
<!-- <el-input-number v-if="i==1" v-model="mioitems[0]" @change="firstNumberChange" placeholder="请输入编号" controls-position="right" style="width:100%"/> -->
|
<!-- <el-input-number v-if="i==1" v-model="mioitems[0]" @change="firstNumberChange" placeholder="请输入编号" controls-position="right" style="width:100%"/> -->
|
||||||
<el-input v-model="mioitems[i-1]" placeholder="请输入编号" :disabled="true" />
|
<el-input v-model="mioitems[i-1]" placeholder="请输入编号" :disabled="cate == 'mainso'" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -421,7 +421,7 @@ export default {
|
||||||
var that = this;
|
var that = this;
|
||||||
var type = this.form.type;
|
var type = this.form.type;
|
||||||
that.form.material = that.selectObj.id;
|
that.form.material = that.selectObj.id;
|
||||||
that.form.batch = that.selectObj.bin_number_main;
|
that.form.batch = that.cate=='helpso'?that.selectObj.bin_number_main:that.selectObj.batch;
|
||||||
that.mTracking = that.selectObj.tracking;
|
that.mTracking = that.selectObj.tracking;
|
||||||
if (type == "do_in") {
|
if (type == "do_in") {
|
||||||
if (that.selectObj.is_assemb) {
|
if (that.selectObj.is_assemb) {
|
||||||
|
@ -446,7 +446,7 @@ export default {
|
||||||
selectBatchChange(item) {
|
selectBatchChange(item) {
|
||||||
this.form.batch = item.batch;
|
this.form.batch = item.batch;
|
||||||
this.form.mb = item.id;
|
this.form.mb = item.id;
|
||||||
this.form.count = 0;
|
this.form.count = Number(item.count);
|
||||||
this.form.warehouse = item.warehouse;
|
this.form.warehouse = item.warehouse;
|
||||||
this.warehouseDisable = true;
|
this.warehouseDisable = true;
|
||||||
this.inputBatchDisable = true;
|
this.inputBatchDisable = true;
|
||||||
|
@ -477,7 +477,7 @@ export default {
|
||||||
for(let i=0;i<that.form.count;i++){
|
for(let i=0;i<that.form.count;i++){
|
||||||
let indexs = i+1;
|
let indexs = i+1;
|
||||||
indexs = indexs<10?'0'+indexs:indexs;
|
indexs = indexs<10?'0'+indexs:indexs;
|
||||||
that.mioitems[i] = that.form.batch+'-'+indexs;
|
that.mioitems[i] = that.cate == "halfgood"?'': that.form.batch+'-'+indexs;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.number = that.mioitems[i];
|
obj.number = that.mioitems[i];
|
||||||
that.mioitemw.push(obj);
|
that.mioitemw.push(obj);
|
||||||
|
@ -521,8 +521,18 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
that.form.mioitemw = that.mioitemw;
|
if(that.mTracking==20&&that.form.count>1&&(that.form.type == 'pur_in'||that.form.type == 'other_in')){
|
||||||
// console.log(that.form);
|
let mioitemw = [];
|
||||||
|
that.mioitems.forEach((item,index) => {
|
||||||
|
mioitemw[index]={ number: item };
|
||||||
|
})
|
||||||
|
if(mioitemw.length==that.mioitems.length){
|
||||||
|
that.form.mioitemw = mioitemw;
|
||||||
|
}else{
|
||||||
|
that.$message.error("请输入正确数量的编号")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
let res;
|
let res;
|
||||||
if (that.mode == "add") {
|
if (that.mode == "add") {
|
||||||
|
|
|
@ -108,7 +108,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiObj: null,
|
apiObj: null,
|
||||||
params: {with_mio:'yes'},
|
params: {with_mio:'yes',material__type:30,mio__state:20},
|
||||||
selection: [],
|
selection: [],
|
||||||
tableData:[],
|
tableData:[],
|
||||||
query: {
|
query: {
|
||||||
|
|
|
@ -144,12 +144,12 @@
|
||||||
width="300"
|
width="300"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-if="scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept"
|
v-if="scope.row.send_mgroup == mgroupId||deptId==scope.row.send_dept"
|
||||||
@click="table_print(scope.row)"
|
@click="table_print(scope.row)"
|
||||||
type="success"
|
type="success"
|
||||||
>打印</el-button
|
>打印</el-button
|
||||||
>
|
> -->
|
||||||
<el-button
|
<el-button
|
||||||
@click="table_receive(scope.row)"
|
@click="table_receive(scope.row)"
|
||||||
type="success"
|
type="success"
|
||||||
|
@ -164,6 +164,15 @@
|
||||||
@click="table_show(scope.row)"
|
@click="table_show(scope.row)"
|
||||||
type="warning"
|
type="warning"
|
||||||
>查看</el-button>
|
>查看</el-button>
|
||||||
|
<el-popconfirm
|
||||||
|
title="确定撤消吗?"
|
||||||
|
v-if="scope.row.submit_time!== null&&(scope.row.type == 10||scope.row.type == 20)"
|
||||||
|
@confirm="table_reBack2(scope.row)"
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
<el-button type="danger">撤消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-popconfirm>
|
||||||
<el-button
|
<el-button
|
||||||
@click="table_edit(scope.row)"
|
@click="table_edit(scope.row)"
|
||||||
v-auth="'handover.update'"
|
v-auth="'handover.update'"
|
||||||
|
@ -415,6 +424,13 @@ export default {
|
||||||
that.$refs.table.queryData(that.query);
|
that.$refs.table.queryData(that.query);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//撤消
|
||||||
|
table_reBack2(row){
|
||||||
|
let that = this;
|
||||||
|
that.$API.wpm.handover.revert.req(row.id).then((res) => {
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
});
|
||||||
|
},
|
||||||
//退回
|
//退回
|
||||||
table_reBack(row){
|
table_reBack(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
<span v-else>(原料棒)</span>
|
<span v-else>(原料棒)</span>
|
||||||
|
|
||||||
<div style="float: right">
|
<div style="float: right">
|
||||||
<span>{{ item.count }}</span>
|
<span>{{ item.count_canhandover }}</span>
|
||||||
<span v-if="item.notok_sign_name !== null" style="color: #aaaaaa">
|
<span v-if="item.notok_sign_name !== null" style="color: #aaaaaa">
|
||||||
({{ item.notok_sign_name }})
|
({{ item.notok_sign_name }})
|
||||||
</span>
|
</span>
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item label="总数量">
|
<el-form-item label="总数量">
|
||||||
<span>{{ listItem.count_cando }}</span>
|
<span>{{ listItem.count_canhandover }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7" >
|
<el-col :span="7" >
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
:max="listItem.count_cando"
|
:max="listItem.count_canhandover"
|
||||||
:disabled="mode==='show'||listItem.tracking==20"
|
:disabled="mode==='show'||listItem.tracking==20"
|
||||||
:step-strictly="true"
|
:step-strictly="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@ -442,7 +442,9 @@ export default {
|
||||||
}
|
}
|
||||||
that.materialOptions = [];
|
that.materialOptions = [];
|
||||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
that.materialOptions = res;
|
that.materialOptions = res.filter(item=>{
|
||||||
|
return item.count_canhandover>0;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取车间不合格物料
|
//获取车间不合格物料
|
||||||
|
@ -455,7 +457,9 @@ export default {
|
||||||
state__in:'20,34'
|
state__in:'20,34'
|
||||||
};
|
};
|
||||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||||
that.materialOptions = res;
|
that.materialOptions = res.filter(item=>{
|
||||||
|
return item.count_canhandover>0;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取废品库物料
|
//获取废品库物料
|
||||||
|
@ -468,7 +472,9 @@ export default {
|
||||||
state_all: 1
|
state_all: 1
|
||||||
};
|
};
|
||||||
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
||||||
that.materialOptions = res;
|
that.materialOptions = res.filter(item=>{
|
||||||
|
return item.count_canhandover>0;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getMaterialOkFangong(){
|
getMaterialOkFangong(){
|
||||||
|
@ -480,7 +486,9 @@ export default {
|
||||||
mgroup: that.mgroupId,
|
mgroup: that.mgroupId,
|
||||||
};
|
};
|
||||||
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
||||||
that.materialOptions = res;
|
that.materialOptions = res.filter(item=>{
|
||||||
|
return item.count_canhandover>0;
|
||||||
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取交送工段人员
|
//获取交送工段人员
|
||||||
|
@ -591,8 +599,8 @@ export default {
|
||||||
})
|
})
|
||||||
data.forEach((item,index)=>{
|
data.forEach((item,index)=>{
|
||||||
item.wm = item.id;
|
item.wm = item.id;
|
||||||
item.count = item.count_cando;
|
item.count = item.count_canhandover;
|
||||||
totalCount += Number(item.count_cando);
|
totalCount += Number(item.count_canhandover);
|
||||||
item.tracking = item.material_.tracking;
|
item.tracking = item.material_.tracking;
|
||||||
if(item.material_.process_name){
|
if(item.material_.process_name){
|
||||||
item.process = item.material_.process_name;
|
item.process = item.material_.process_name;
|
||||||
|
@ -734,7 +742,7 @@ export default {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
if(that.form.handoverb&&that.form.handoverb.length>0){
|
if(that.form.handoverb&&that.form.handoverb.length>0){
|
||||||
that.form.handoverb.forEach((item) => {
|
that.form.handoverb.forEach((item) => {
|
||||||
if(item.batch == res.batch&&item.state==res.state){
|
if(item.batch == res.batch&&item.state==res.state&&item.defect==res.defect){
|
||||||
arr.push(item);
|
arr.push(item);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -760,9 +768,10 @@ export default {
|
||||||
if(item.material_.process_name){
|
if(item.material_.process_name){
|
||||||
obj.process = item.material_.process_name;
|
obj.process = item.material_.process_name;
|
||||||
}
|
}
|
||||||
obj.count_cando = item.count;
|
obj.count_cando = item.count_canhandover;
|
||||||
obj.count = item.count;
|
obj.count = item.count_canhandover;
|
||||||
obj.state = res.state;
|
obj.state = res.state;
|
||||||
|
obj.defect = res.defect;
|
||||||
obj.handoverbw = [];
|
obj.handoverbw = [];
|
||||||
that.$API.wpm.wpr.list.req({wm:item.id,page:0}).then((res) => {
|
that.$API.wpm.wpr.list.req({wm:item.id,page:0}).then((res) => {
|
||||||
let handoverbw = [];
|
let handoverbw = [];
|
||||||
|
@ -810,8 +819,8 @@ export default {
|
||||||
if(arr[0].material_.process_name){
|
if(arr[0].material_.process_name){
|
||||||
obj2.process = arr[0].material_.process_name;
|
obj2.process = arr[0].material_.process_name;
|
||||||
}
|
}
|
||||||
obj2.count_cando = arr[0].count;
|
obj2.count_cando = arr[0].count_canhandover;
|
||||||
obj2.count = arr[0].count;
|
obj2.count = arr[0].count_canhandover;
|
||||||
that.form.handoverb.push(obj2);
|
that.form.handoverb.push(obj2);
|
||||||
that.wm_in = "";
|
that.wm_in = "";
|
||||||
}
|
}
|
||||||
|
@ -866,7 +875,7 @@ export default {
|
||||||
if(item.material_.process_name){
|
if(item.material_.process_name){
|
||||||
obj2.process = item.material_.process_name;
|
obj2.process = item.material_.process_name;
|
||||||
}
|
}
|
||||||
obj2.count_cando = item.count;
|
obj2.count_cando = item.count_canhandover;
|
||||||
obj2.handoverbw = [];
|
obj2.handoverbw = [];
|
||||||
obj2.count = 1;
|
obj2.count = 1;
|
||||||
let obj3 = {};
|
let obj3 = {};
|
||||||
|
|
|
@ -355,7 +355,7 @@
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="mlogItem.submit_time == null"
|
v-if="mlogItem.submit_time == null&&(mlogItem.material_out_&&mlogItem.material_out_.tracking==10||scope.row.material_out_tracking==10)"
|
||||||
style="margin-right: 10px;"
|
style="margin-right: 10px;"
|
||||||
@click="table_out_check(scope.row)"
|
@click="table_out_check(scope.row)"
|
||||||
>编辑</el-button>
|
>编辑</el-button>
|
||||||
|
|
|
@ -193,6 +193,15 @@
|
||||||
@click="table_show(scope.row)"
|
@click="table_show(scope.row)"
|
||||||
type="success"
|
type="success"
|
||||||
>查看</el-button>
|
>查看</el-button>
|
||||||
|
<el-popconfirm
|
||||||
|
title="确定撤消吗?"
|
||||||
|
v-if="scope.row.submit_time!== null&&(scope.row.type == 10||scope.row.type == 20)"
|
||||||
|
@confirm="table_reBack2(scope.row)"
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
<el-button type="danger" link size="small">撤消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-popconfirm>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -474,6 +483,13 @@ export default {
|
||||||
that.$refs.table.queryData(that.query);
|
that.$refs.table.queryData(that.query);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//撤消
|
||||||
|
table_reBack2(row){
|
||||||
|
let that = this;
|
||||||
|
that.$API.wpm.handover.revert.req(row.id).then((res) => {
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
});
|
||||||
|
},
|
||||||
//退回
|
//退回
|
||||||
table_reBack(row){
|
table_reBack(row){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -37,11 +37,12 @@
|
||||||
<el-form-item label="交接物料">
|
<el-form-item label="交接物料">
|
||||||
<xtSelect
|
<xtSelect
|
||||||
:apiObj="apiObjM"
|
:apiObj="apiObjM"
|
||||||
v-model="form.wm_in"
|
v-model="selectObjIds"
|
||||||
v-model:obj="selectObj"
|
v-model:obj="selectObjs"
|
||||||
:labelField="'batch'"
|
:labelField="'batch'"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
:params = "paramsM"
|
:params = "paramsM"
|
||||||
|
:multiple="true"
|
||||||
@change="materialChange0"
|
@change="materialChange0"
|
||||||
>
|
>
|
||||||
<el-table-column label="物料" prop="full_name">
|
<el-table-column label="物料" prop="full_name">
|
||||||
|
@ -52,29 +53,8 @@
|
||||||
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" prop="count" width="110px"></el-table-column>
|
<el-table-column label="可交接数量" prop="count_canhandover" width="110px"></el-table-column>
|
||||||
</xtSelect>
|
</xtSelect>
|
||||||
<!-- <el-select
|
|
||||||
v-model="selectItems"
|
|
||||||
placeholder="交接物料"
|
|
||||||
filterable
|
|
||||||
multiple
|
|
||||||
clearable
|
|
||||||
@change="materialChange"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in materialOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.batch"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
|
||||||
<span>{{ item.batch }}</span>
|
|
||||||
<span>({{ item.material_name }})</span>
|
|
||||||
<span v-if="item.defect_name !== null" style="color: orangered">{{ item.defect_name }}</span>
|
|
||||||
<span style="float: right">{{ item.count }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select> -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -254,9 +234,11 @@ export default {
|
||||||
recive_mgroup: null,
|
recive_mgroup: null,
|
||||||
handoverb:[],
|
handoverb:[],
|
||||||
},
|
},
|
||||||
|
selectObjIds:[],
|
||||||
apiObjM:null,
|
apiObjM:null,
|
||||||
paramsM:{},
|
paramsM:{},
|
||||||
selectObj:{},
|
selectObj:{},
|
||||||
|
selectObjs:[],
|
||||||
rules: {
|
rules: {
|
||||||
batch: [
|
batch: [
|
||||||
{
|
{
|
||||||
|
@ -379,33 +361,6 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//获取车间物料
|
|
||||||
// getMaterial() {
|
|
||||||
// let that = this;
|
|
||||||
// var req = {
|
|
||||||
// page: 0,
|
|
||||||
// state:10,
|
|
||||||
// tag:'done'
|
|
||||||
// };
|
|
||||||
// that.materialOptions = [];
|
|
||||||
// req.mgroup = that.mgroupId;
|
|
||||||
// that.listParams = req;
|
|
||||||
// this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
|
||||||
// that.materialOptions = res;
|
|
||||||
// res.forEach(item=>{
|
|
||||||
// if(that.codeText!==''&&item.batch === that.codeText){
|
|
||||||
// let obj = {};
|
|
||||||
// obj.wm = item.id;
|
|
||||||
// obj.batch = item.batch;
|
|
||||||
// obj.count = item.count_cando;
|
|
||||||
// obj.count_cando = item.count_cando;
|
|
||||||
// that.totalCount = item.count_cando;
|
|
||||||
// that.form.handoverb.push(obj)
|
|
||||||
// that.getResaveMgroups(item.material);
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
getResaveMgroups(material){
|
getResaveMgroups(material){
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {
|
let params = {
|
||||||
|
@ -419,46 +374,6 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//获取车间不合格物料
|
|
||||||
// getMaterialNotok() {
|
|
||||||
// let that = this;
|
|
||||||
// that.materialOptions = [];
|
|
||||||
// var req = {
|
|
||||||
// mgroupx: that.mgroupId,
|
|
||||||
// page: 0,
|
|
||||||
// state:20
|
|
||||||
// };
|
|
||||||
// that.listParams = req;
|
|
||||||
// this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
|
||||||
// that.materialOptions = res;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// getMaterialRework(){
|
|
||||||
// let that = this;
|
|
||||||
// that.materialOptions = [];
|
|
||||||
// var req = {
|
|
||||||
// mgroup: that.mgroupId,
|
|
||||||
// page: 0,
|
|
||||||
// tag : 'done'
|
|
||||||
// };
|
|
||||||
// that.listParams = req;
|
|
||||||
// this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
|
||||||
// that.materialOptions = res;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
//获取废品库物料
|
|
||||||
// getMaterialFP() {
|
|
||||||
// let that = this;
|
|
||||||
// that.materialOptions = [];
|
|
||||||
// var obj = {
|
|
||||||
// page: 0,
|
|
||||||
// state : 50,
|
|
||||||
// state_all: 1
|
|
||||||
// };
|
|
||||||
// that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
|
||||||
// that.materialOptions = res;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
//获取交送工段人员
|
//获取交送工段人员
|
||||||
getUserList() {
|
getUserList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -529,16 +444,18 @@ export default {
|
||||||
},
|
},
|
||||||
//显示
|
//显示
|
||||||
open(mode = "add",data,mtype) {
|
open(mode = "add",data,mtype) {
|
||||||
|
console.log(data)
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
this.mtype = mtype;
|
this.mtype = mtype;
|
||||||
if(data!==''&&data!==null&&data!==undefined){
|
if(data!==''&&data!==null&&data!==undefined){
|
||||||
|
console.log(typeof(data)=='string')
|
||||||
if(typeof(data)=='string'){
|
if(typeof(data)=='string'){
|
||||||
this.codeText = data.replace(" ","");
|
this.codeText = data.replace(" ","");
|
||||||
this.codeTextChange(this.codeText)
|
this.codeTextChange(this.codeText)
|
||||||
}else{
|
}else{
|
||||||
this.form.handoverb = data;
|
this.form.handoverb = data;
|
||||||
data.forEach(item=>{
|
data.forEach(item=>{
|
||||||
this.totalCount += Number(item.count_cando);
|
this.totalCount += Number(item.count);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -550,45 +467,24 @@ export default {
|
||||||
},
|
},
|
||||||
materialChange0(){
|
materialChange0(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj = {};
|
that.form.handoverb = [];
|
||||||
obj.wm = that.selectObj.id;
|
that.totalCount = 0;
|
||||||
obj.batch = that.selectObj.batch;
|
that.selectObjs.forEach(item=>{
|
||||||
obj.label = that.selectObj.defect !== null?that.selectObj.batch+'('+that.selectObj.material_name+')'+that.selectObj.defect_name:that.selectObj.batch+'('+that.selectObj.material_name+')';
|
let obj = {};
|
||||||
obj.count = that.selectObj.count_cando;
|
obj.wm = item.id;
|
||||||
obj.defect_name = that.selectObj.defect_name;
|
obj.state = item.state;
|
||||||
obj.count_cando = that.selectObj.count_cando;
|
obj.batch = item.batch;
|
||||||
obj.material = that.selectObj.material;
|
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
|
||||||
if(that.form.handoverb.length>0){
|
obj.count = item.count_canhandover;
|
||||||
let datas = that.form.handoverb.filter((item) => {
|
obj.defect = item.defect;
|
||||||
return item.wm==that.selectObj.id;
|
obj.defect_name = item.defect_name;
|
||||||
});
|
obj.count_cando = item.count_canhandover;
|
||||||
if(datas.length>0){
|
obj.material = item.material;
|
||||||
that.$message.warning('该物料已存在');
|
that.totalCount += Number(obj.count);
|
||||||
}else{
|
|
||||||
that.totalCount += Number(obj.count_cando);
|
|
||||||
that.form.handoverb.push(obj);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
that.totalCount += Number(obj.count_cando);
|
|
||||||
that.form.handoverb.push(obj);
|
that.form.handoverb.push(obj);
|
||||||
}
|
that.getResaveMgroups(obj.material);
|
||||||
that.getResaveMgroups(obj.material);
|
})
|
||||||
},
|
},
|
||||||
// materialChange() {
|
|
||||||
// let that = this;
|
|
||||||
// let totalCount = 0;
|
|
||||||
// let data = that.materialOptions.filter((item) => {
|
|
||||||
// return that.selectItems.indexOf(item.id)>-1;
|
|
||||||
// });
|
|
||||||
// data.forEach(item=>{
|
|
||||||
// item.wm = item.id;
|
|
||||||
// item.count = item.count_cando;
|
|
||||||
// totalCount += Number(item.count_cando);
|
|
||||||
// })
|
|
||||||
// that.totalCount = totalCount;
|
|
||||||
// that.form.handoverb = data;
|
|
||||||
// that.getResaveMgroups(data[0].material);
|
|
||||||
// },
|
|
||||||
countChange(){
|
countChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
let totalCount = 0;
|
let totalCount = 0;
|
||||||
|
@ -650,11 +546,19 @@ export default {
|
||||||
},
|
},
|
||||||
//表单注入数据
|
//表单注入数据
|
||||||
setData(data) {
|
setData(data) {
|
||||||
|
console.log(data)
|
||||||
|
let that = this;
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
|
that.totalCount = 0;
|
||||||
|
that.form.handoverb = data.handoverb;
|
||||||
|
data.handoverb.forEach(item=>{
|
||||||
|
item.label = item.batch;
|
||||||
|
that.totalCount += Number(item.count);
|
||||||
|
})
|
||||||
if(data.type==30){
|
if(data.type==30){
|
||||||
this.getUserList3();
|
that.getUserList3();
|
||||||
}else{
|
}else{
|
||||||
this.getUserList2();
|
that.getUserList2();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置过滤项
|
//设置过滤项
|
||||||
|
@ -676,7 +580,7 @@ export default {
|
||||||
let id = data.split('#')[1];
|
let id = data.split('#')[1];
|
||||||
this.$API.cm.labelmat.item.req(id).then((res) => {
|
this.$API.cm.labelmat.item.req(id).then((res) => {
|
||||||
let arr = that.form.handoverb.filter((item) => {
|
let arr = that.form.handoverb.filter((item) => {
|
||||||
return item.batch == res.batch;
|
return item.batch == res.batch&&item.state==res.state&&item.defect==res.defect;
|
||||||
})
|
})
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
that.$message.error("该批次已存在")
|
that.$message.error("该批次已存在")
|
||||||
|
@ -691,21 +595,21 @@ export default {
|
||||||
if(res1.length>0){
|
if(res1.length>0){
|
||||||
res1.forEach(item=>{
|
res1.forEach(item=>{
|
||||||
let cando = Number(item.count_canhandover);
|
let cando = Number(item.count_canhandover);
|
||||||
if(cando>0&&item.defect_name==res.defect_name){
|
if(cando>0&&(item.defect==null||item.defect_name==res.defect_name)){
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.wm = item.id;
|
obj.wm = item.id;
|
||||||
obj.batch = item.batch;
|
obj.batch = item.batch;
|
||||||
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
|
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
|
||||||
obj.count = item.count_cando;
|
obj.count = cando;
|
||||||
|
obj.state = item.state;
|
||||||
|
obj.defect = item.defect;
|
||||||
obj.defect_name = item.defect_name;
|
obj.defect_name = item.defect_name;
|
||||||
obj.count_cando = item.count_cando;
|
obj.count_cando = cando;
|
||||||
obj.material = item.material;
|
obj.material = item.material;
|
||||||
that.form.handoverb.push(obj)
|
that.form.handoverb.push(obj)
|
||||||
|
that.totalCount += Number(obj.count);
|
||||||
that.getResaveMgroups(obj.material);
|
that.getResaveMgroups(obj.material);
|
||||||
}
|
}
|
||||||
// else{
|
|
||||||
// that.$message.error("该批次物料没有可交接的数量")
|
|
||||||
// }
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
that.codeText = '';
|
that.codeText = '';
|
||||||
|
|
|
@ -214,6 +214,8 @@
|
||||||
</sc-upload-file>
|
</sc-upload-file>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-col :md="8" :sm="12" :xs="24" v-for="item in testitems" :key="item.id">
|
<el-col :md="8" :sm="12" :xs="24" v-for="item in testitems" :key="item.id">
|
||||||
<el-form-item :label="item.name">
|
<el-form-item :label="item.name">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
@ -269,6 +271,8 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input
|
<el-input
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
:labelField="'batch'"
|
:labelField="'batch'"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
:params = "paramsM"
|
:params = "paramsM"
|
||||||
|
@change="materialBatchChange"
|
||||||
>
|
>
|
||||||
<!-- :params = "{type__in: '10,20',is_hidden: false}" -->
|
<!-- :params = "{type__in: '10,20',is_hidden: false}" -->
|
||||||
<el-table-column label="物料" prop="full_name">
|
<el-table-column label="物料" prop="full_name">
|
||||||
|
@ -385,15 +386,20 @@ export default {
|
||||||
},
|
},
|
||||||
materialBatchChange(){
|
materialBatchChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.materialOptions.forEach(item => {
|
that.form.batch = that.selectObj.batch;
|
||||||
if(item.id==that.form.wm_in){
|
that.form.count_use = that.selectObj.count;
|
||||||
that.form.batch = item.batch;
|
that.batch_count = that.selectObj.count;
|
||||||
that.form.count_use = item.count;
|
that.materialFix = that.selectObj.material;
|
||||||
that.batch_count = item.count;
|
that.getdefects();
|
||||||
that.materialFix = item.material;
|
// that.materialOptions.forEach(item => {
|
||||||
that.getdefects();
|
// if(item.id==that.form.wm_in){
|
||||||
}
|
// that.form.batch = item.batch;
|
||||||
});
|
// that.form.count_use = item.count;
|
||||||
|
// that.batch_count = item.count;
|
||||||
|
// that.materialFix = item.material;
|
||||||
|
// that.getdefects();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
//添加层组
|
//添加层组
|
||||||
cellsAdd(){
|
cellsAdd(){
|
||||||
|
|
Loading…
Reference in New Issue