Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
a7aeb252ff
|
|
@ -141,7 +141,13 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检验" prop="count_tested" v-if="cate=='mainso'">
|
<el-table-column label="检验" prop="count_tested" v-if="cate=='mainso'&&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检验提交" prop="count_tested" v-if="cate=='mainso'&&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.test_date == null" type="warning">否</el-tag>
|
||||||
|
<el-tag v-else type="success">是</el-tag>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="不合格数量" prop="count_notok" v-if="cate!=='helpso'">
|
<el-table-column label="不合格数量" prop="count_notok" v-if="cate!=='helpso'">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -158,8 +164,7 @@
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="table_check(scope.row)"
|
@click="table_check(scope.row)"
|
||||||
v-if="project_code=='bxerp'&&mioObj.state == 10 &&
|
v-if="project_code=='bxerp'&&mioObj.state == 10 &&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
|
||||||
(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
|
|
||||||
v-auth="'mioitem.test'"
|
v-auth="'mioitem.test'"
|
||||||
>检验</el-button>
|
>检验</el-button>
|
||||||
<scFileImport
|
<scFileImport
|
||||||
|
|
@ -672,9 +677,9 @@ export default {
|
||||||
if((index == 6||index == 7||index == 8||index == 9)&&column.label=='不合格数量'){
|
if((index == 6||index == 7||index == 8||index == 9)&&column.label=='不合格数量'){
|
||||||
propert = 'count_notok';
|
propert = 'count_notok';
|
||||||
}
|
}
|
||||||
if((index == 6||index == 7||index == 8)&&column.label=='检验'){
|
// if((index == 6||index == 7||index == 8)&&column.label=='检验'){
|
||||||
propert = 'count_tested';
|
// propert = 'count_tested';
|
||||||
}
|
// }
|
||||||
if(index == 6 &&column.label == '发出数量'){
|
if(index == 6 &&column.label == '发出数量'){
|
||||||
propert = 'count_send';
|
propert = 'count_send';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -605,9 +605,17 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item
|
<el-form-item v-if="project_code === 'gx'" label="总数">
|
||||||
:label="project_code === 'gx'? '总数': '总袋(桶)数'"
|
<el-input-number
|
||||||
>
|
v-model="form.count"
|
||||||
|
:min="0"
|
||||||
|
disabled="true"
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="project_code === 'gz'" label="总袋(桶)数">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.count_bag"
|
v-model="form.count_bag"
|
||||||
:min="0"
|
:min="0"
|
||||||
|
|
@ -618,7 +626,14 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="抽样数量">
|
<el-form-item label="不合格数量" v-if="project_code === 'gx'&&type == 'pur_in'">
|
||||||
|
<el-input
|
||||||
|
disabled
|
||||||
|
v-model="form.count_notok"
|
||||||
|
placeholder="不合格数量"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="抽样数量" v-else>
|
||||||
<!-- 光芯 -->
|
<!-- 光芯 -->
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-if="project_code === 'gx'"
|
v-if="project_code === 'gx'"
|
||||||
|
|
@ -666,7 +681,17 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="检验合格" prop="is_testok">
|
<el-form-item label="崩边" v-if="project_code === 'gx'&&type == 'pur_in'">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.count_n_qt"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
controls-position="right"
|
||||||
|
@change="nqtChange"
|
||||||
|
>
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="检验合格" prop="is_testok" v-else>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.is_testok"
|
v-model="form.is_testok"
|
||||||
placeholder="检验合格"
|
placeholder="检验合格"
|
||||||
|
|
@ -985,6 +1010,7 @@ export default {
|
||||||
console.log("objitem", that.objitem);
|
console.log("objitem", that.objitem);
|
||||||
that.form.material_name = that.objitem.material_name;
|
that.form.material_name = that.objitem.material_name;
|
||||||
that.form.batch = that.objitem.batch;
|
that.form.batch = that.objitem.batch;
|
||||||
|
that.form.count = that.objitem.count;
|
||||||
that.form.count_bag = that.objitem.count_bag;
|
that.form.count_bag = that.objitem.count_bag;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
|
|
@ -1070,6 +1096,9 @@ export default {
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
nqtChange(){
|
||||||
|
this.form.count_notok = this.form.count_n_qt;
|
||||||
|
},
|
||||||
getMaterialItem(){
|
getMaterialItem(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.mtm.material.item.req(that.objitem.material).then(()=>{
|
that.$API.mtm.material.item.req(that.objitem.material).then(()=>{
|
||||||
|
|
@ -1325,13 +1354,15 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
try {
|
try {
|
||||||
if (that.type == "pur_in") {
|
if (that.type == "pur_in"&&that.project_code!="gx") {
|
||||||
console.log(that.form);
|
console.log(that.form);
|
||||||
let arr = [];
|
let arr = [];
|
||||||
that.weight_kgs.forEach((item) => {
|
if(that.weight_kgs.length>0){
|
||||||
arr.push(item.value);
|
that.weight_kgs.forEach((item) => {
|
||||||
});
|
arr.push(item.value);
|
||||||
that.form.weight_kgs = arr;
|
});
|
||||||
|
that.form.weight_kgs = arr;
|
||||||
|
}
|
||||||
console.log('that.form',that.form);
|
console.log('that.form',that.form);
|
||||||
that.$API.inm.mioitem.testpurin
|
that.$API.inm.mioitem.testpurin
|
||||||
.req(that.mioitemId, that.form)
|
.req(that.mioitemId, that.form)
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@
|
||||||
prop="val_xj"
|
prop="val_xj"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag>{{state_xj[scope.row.val_xj]}}</el-tag>
|
<el-tag v-if="scope.row.val_xj!=null&&scope.row.val_xj!=''">{{state_xj[scope.row.val_xj]}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
form: {
|
form: {
|
||||||
val_xj: "S",
|
val_xj: "",
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
belong_dept: [
|
belong_dept: [
|
||||||
|
|
|
||||||
|
|
@ -51,11 +51,26 @@
|
||||||
<el-table-column v-for="item in lists" :key="item" :label="item.text" align="center">
|
<el-table-column v-for="item in lists" :key="item" :label="item.text" align="center">
|
||||||
<el-table-column v-for="item1 in item.value" :key="item1" :label="item1">
|
<el-table-column v-for="item1 in item.value" :key="item1" :label="item1">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-if="scope.row.indexs==0&&scope.row" v-model="scope.row[item.text+'_'+item1]"></el-input>
|
<el-input v-if="scope.row.indexs==0&&scope.row" v-model="scope.row[item.text+'_'+item1]" @change="xishuChange"></el-input>
|
||||||
<span v-if="scope.row.indexs!==0&&scope.row">{{ scope.row[item.text+'_'+item1] }}</span>
|
<span v-if="scope.row.indexs!==0&&scope.row">{{ scope.row[item.text+'_'+item1] }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="其它工时" prop="其它工时">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-if="scope.row.indexs!==0&&scope.row" v-model="scope.row.time_other" @change="xishuChange"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="总工时" prop="总工时">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-if="scope.row.indexs!==0&&scope.row" v-model="scope.row.time_all"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" prop="备注">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-input v-if="scope.row.indexs!==0&&scope.row" v-model="scope.row.note"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
|
@ -87,45 +102,83 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
getData(){
|
getData(){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.lists = [];
|
||||||
that.mgruops = [];
|
that.mgruops = [];
|
||||||
that.tableData = [];
|
that.tableData = [];
|
||||||
|
that.titleList = [];
|
||||||
|
that.coefficient = [];
|
||||||
let params = {};
|
let params = {};
|
||||||
params.query = that.query;
|
params.query = that.query;
|
||||||
that.$API.bi.dataset.exec.req('lineDay_p', params).then((res) => {
|
that.$API.bi.dataset.exec.req('lineDay_p', params).then((res) => {
|
||||||
let data = res.data2.ds0;
|
let data = res.data2.ds0;
|
||||||
that.lists = [];
|
let coefficient = [];
|
||||||
let coefficient = [];
|
if(data.length>0){
|
||||||
data.forEach(item=>{
|
data.forEach(item=>{
|
||||||
let obj = item.工序物料生产数?JSON.parse(item.工序物料生产数):{};
|
let obj = item.工序物料生产数?JSON.parse(item.工序物料生产数):{};
|
||||||
for(let key in obj){
|
for(let key in obj){
|
||||||
if(coefficient.indexOf(key)<0){
|
if(coefficient.indexOf(key)<0){
|
||||||
coefficient.push(key);
|
coefficient.push(key);
|
||||||
}
|
|
||||||
let mgroup = key.split('_')[0];
|
|
||||||
let pname = key.split('_')[1];
|
|
||||||
if(that.mgruops.indexOf(mgroup)<0){
|
|
||||||
that.mgruops.push(mgroup);
|
|
||||||
that.lists.push({text:mgroup,value:[pname]});
|
|
||||||
}else{
|
|
||||||
var index = that.mgruops.indexOf(mgroup);
|
|
||||||
if(that.lists[index].value.indexOf(pname)<0){
|
|
||||||
that.lists[index].value.push(pname);
|
|
||||||
}
|
}
|
||||||
|
let mgroup = key.split('_')[0];
|
||||||
|
let pname = key.split('_')[1];
|
||||||
|
if(that.mgruops.indexOf(mgroup)<0){
|
||||||
|
that.mgruops.push(mgroup);
|
||||||
|
that.lists.push({text:mgroup,value:[pname]});
|
||||||
|
}else{
|
||||||
|
var index = that.mgruops.indexOf(mgroup);
|
||||||
|
if(that.lists[index].value.indexOf(pname)<0){
|
||||||
|
that.lists[index].value.push(pname);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item[key]= obj[key];
|
||||||
|
item[pname]= obj[key];
|
||||||
}
|
}
|
||||||
item[key]= obj[key];
|
})
|
||||||
item[pname]= obj[key];
|
that.coefficient = coefficient;
|
||||||
}
|
let item0 = {日期:'系数',操作人:'',indexs:0};
|
||||||
})
|
coefficient.forEach(cof=>{
|
||||||
let item0 = {日期:'系数',操作人:'',indexs:0};
|
item0[cof]= 1;
|
||||||
coefficient.forEach(cof=>{
|
})
|
||||||
item0[cof]= 1;
|
|
||||||
})
|
|
||||||
if(data.length>0){
|
|
||||||
data.unshift(item0);
|
data.unshift(item0);
|
||||||
}
|
data.forEach(item1 => {
|
||||||
that.tableData = data;
|
item1.time_other=0;
|
||||||
|
let all = 0;
|
||||||
|
coefficient.forEach(item2 => {
|
||||||
|
if(item1[item2]){
|
||||||
|
all = all+ Number(item1[item2])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
item1.time_all = all;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
that.tableData = data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
xishuChange(){
|
||||||
|
let that = this;
|
||||||
|
that.tableData.forEach((item1,index1) => {
|
||||||
|
if(index1>0){
|
||||||
|
let all = 0;
|
||||||
|
that.coefficient.forEach(item2 => {
|
||||||
|
if(item1[item2]){
|
||||||
|
all = all+ Number(item1[item2])*Number(that.tableData[0][item2])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
item1.time_all = all+Number(item1.time_other);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
otherChange(index){
|
||||||
|
let that = this;
|
||||||
|
let all = 0;
|
||||||
|
console.log('index',index)
|
||||||
|
that.coefficient.forEach(item2 => {
|
||||||
|
if(that.tableData[index][item2]){
|
||||||
|
all = all+ Number(that.tableData[index][item2])*Number(that.tableData[0][item2])
|
||||||
|
}
|
||||||
|
that.tableData[index].time_all = all+Number(that.tableData[index].time_other);
|
||||||
|
})
|
||||||
|
},
|
||||||
deptChange(){
|
deptChange(){
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -86,9 +86,11 @@
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
|
:max="count_cando"
|
||||||
:step-strictly="true"
|
:step-strictly="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入领用数量"
|
placeholder="请输入领用数量"
|
||||||
|
@change="countUseChange"
|
||||||
>
|
>
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -100,6 +102,7 @@
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
|
:max="form.count_use"
|
||||||
:step-strictly="true"
|
:step-strictly="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入加工数量"
|
placeholder="请输入加工数量"
|
||||||
|
|
@ -114,6 +117,7 @@
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
|
disabled="true"
|
||||||
:step-strictly="true"
|
:step-strictly="true"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请输入合格数"
|
placeholder="请输入合格数"
|
||||||
|
|
@ -586,6 +590,7 @@ export default {
|
||||||
|
|
||||||
handle_user: "",
|
handle_user: "",
|
||||||
},
|
},
|
||||||
|
count_cando:0,
|
||||||
mlogb: [],
|
mlogb: [],
|
||||||
userList: [],
|
userList: [],
|
||||||
batchOptions: [],
|
batchOptions: [],
|
||||||
|
|
@ -663,9 +668,31 @@ export default {
|
||||||
},
|
},
|
||||||
batchChange(){
|
batchChange(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.form.count_use = that.selectBatch.count_cando;
|
this.form.count_notok =
|
||||||
that.form.count_real = that.selectBatch.count_cando;
|
this.form.count_n_hs =
|
||||||
that.form.count_ok = that.selectBatch.count_cando;
|
this.form.count_n_cs =
|
||||||
|
this.form.count_n_zz =
|
||||||
|
this.form.count_n_tw =
|
||||||
|
this.form.count_n_zdd =
|
||||||
|
this.form.count_n_d =
|
||||||
|
this.form.count_n_dl =
|
||||||
|
this.form.count_n_qp =
|
||||||
|
this.form.count_n_bl =
|
||||||
|
this.form.count_n_hw =
|
||||||
|
this.form.count_n_yp =
|
||||||
|
this.form.count_n_bp =
|
||||||
|
this.form.count_n_sc =
|
||||||
|
this.form.count_n_zjd =
|
||||||
|
this.form.count_n_zjx =
|
||||||
|
this.form.count_n_qx =
|
||||||
|
this.form.count_n_js =
|
||||||
|
this.form.count_n_tydd =
|
||||||
|
this.form.count_n_sw =
|
||||||
|
this.form.count_n_bhpcd =
|
||||||
|
this.form.count_n_wq =
|
||||||
|
this.form.count_n_qt =
|
||||||
|
this.form.count_n_zw = 0;
|
||||||
|
that.count_cando = that.form.count_use = that.form.count_real = that.form.count_ok = that.selectBatch.count_cando;
|
||||||
},
|
},
|
||||||
//获取车间物料批次号
|
//获取车间物料批次号
|
||||||
getBatchs() {
|
getBatchs() {
|
||||||
|
|
@ -699,6 +726,12 @@ export default {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
countUseChange(){
|
||||||
|
if(this.form.count_real>this.form.count_use){
|
||||||
|
this.form.count_real = this.form.count_use;
|
||||||
|
this.count_ok = this.form.count_real - this.form.count_notok;
|
||||||
|
}
|
||||||
|
},
|
||||||
countNotOkSun() {
|
countNotOkSun() {
|
||||||
this.form.count_notok =
|
this.form.count_notok =
|
||||||
Number(this.form.count_n_hs) +
|
Number(this.form.count_n_hs) +
|
||||||
|
|
@ -724,7 +757,7 @@ export default {
|
||||||
Number(this.form.count_n_wq) +
|
Number(this.form.count_n_wq) +
|
||||||
Number(this.form.count_n_qt) +
|
Number(this.form.count_n_qt) +
|
||||||
Number(this.form.count_n_zw);
|
Number(this.form.count_n_zw);
|
||||||
this.form.count_real = this.form.count_use-this.form.count_notok;
|
this.form.count_ok = this.form.count_real-this.form.count_notok;
|
||||||
},
|
},
|
||||||
//提交
|
//提交
|
||||||
submit() {
|
submit() {
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@
|
||||||
</template>
|
</template>
|
||||||
<!-- 批次物料列表 wprList -->
|
<!-- 批次物料列表 wprList -->
|
||||||
<template v-if="route_code=='shangpaipingmo'">
|
<template v-if="route_code=='shangpaipingmo'">
|
||||||
|
<el-checkbox v-model="checkedStatus[bwIndex]" label="全选" @change="checkAllChange(bwIndex)" style="display: block;margin-top: -15px;"/>
|
||||||
<span v-for="item2 in form.handoverb[bwIndex].handoverbw" :key="item2" style="margin-right: 10px;">
|
<span v-for="item2 in form.handoverb[bwIndex].handoverbw" :key="item2" style="margin-right: 10px;">
|
||||||
<el-checkbox v-model="item2.checked" :label="item2.number" @change="handleChange(bwIndex)"/>
|
<el-checkbox v-model="item2.checked" :label="item2.number" @change="handleChange(bwIndex)"/>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -197,12 +198,12 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="mtype==30||type==50">
|
<el-col :md="12" :sm="24" v-if="(mtype==30||type==50)&&new_wm==''">
|
||||||
<el-form-item label="更改批次">
|
<el-form-item label="更改批次">
|
||||||
<el-switch v-model="change_batch" :disabled="type==50"></el-switch>
|
<el-switch v-model="change_batch" :disabled="type==50"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="type==50">
|
<el-col :md="12" :sm="24" v-if="type==50&&new_wm==''">
|
||||||
<el-form-item label="更改物料">
|
<el-form-item label="更改物料">
|
||||||
<xtSelect
|
<xtSelect
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
|
|
@ -222,7 +223,7 @@
|
||||||
<el-input v-model="form.note" placeholder="处理备注"></el-input>
|
<el-input v-model="form.note" placeholder="处理备注"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="change_batch">
|
<el-col :md="12" :sm="24" v-if="change_batch&&new_wm==''">
|
||||||
<el-form-item label="新批次号" prop="new_batch">
|
<el-form-item label="新批次号" prop="new_batch">
|
||||||
<el-input v-model="form.new_batch" placeholder="新批次号" @change="new_batch(form.new_batch)" :disabled="type==50&&isFeiPinku"></el-input>
|
<el-input v-model="form.new_batch" placeholder="新批次号" @change="new_batch(form.new_batch)" :disabled="type==50&&isFeiPinku"></el-input>
|
||||||
<span style="color: red;">请手动录入新批次号,不要用已有批次!</span>
|
<span style="color: red;">请手动录入新批次号,不要用已有批次!</span>
|
||||||
|
|
@ -265,6 +266,10 @@ export default {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
|
new_wm:{
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
scanDialog
|
scanDialog
|
||||||
|
|
@ -364,6 +369,7 @@ export default {
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
deptID:'',
|
deptID:'',
|
||||||
bwIndex:0,
|
bwIndex:0,
|
||||||
|
checkedStatus:[],
|
||||||
userList: [],
|
userList: [],
|
||||||
userList2: [],
|
userList2: [],
|
||||||
deptOptions:[],
|
deptOptions:[],
|
||||||
|
|
@ -383,7 +389,7 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.form.type = that.type;
|
that.form.type = that.type;
|
||||||
if(that.type==50){
|
if(that.type==50){
|
||||||
that.form.mtype=30;
|
that.mtype=30;
|
||||||
that.change_batch = true;
|
that.change_batch = true;
|
||||||
}
|
}
|
||||||
let arr = that.$route.path.split("/");
|
let arr = that.$route.path.split("/");
|
||||||
|
|
@ -392,6 +398,10 @@ export default {
|
||||||
that.materialObj = materialObj;
|
that.materialObj = materialObj;
|
||||||
that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date());
|
that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date());
|
||||||
that.form.send_mgroup = that.mgroupId;
|
that.form.send_mgroup = that.mgroupId;
|
||||||
|
if(that.new_wm!==''){
|
||||||
|
that.mtype==30;
|
||||||
|
that.form.new_wm = that.new_wm;
|
||||||
|
}
|
||||||
if(that.wmItem.wm){
|
if(that.wmItem.wm){
|
||||||
that.form.new_batch = that.wmItem.batch;
|
that.form.new_batch = that.wmItem.batch;
|
||||||
that.form.material_changed = that.wmItem.material;
|
that.form.material_changed = that.wmItem.material;
|
||||||
|
|
@ -427,6 +437,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
deletebw(index){
|
deletebw(index){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
that.checkedStatus.splice(index,1);
|
||||||
this.form.handoverb[this.bwIndex].handoverbw.splice(index,1);
|
this.form.handoverb[this.bwIndex].handoverbw.splice(index,1);
|
||||||
this.form.handoverb[this.bwIndex].count--;
|
this.form.handoverb[this.bwIndex].count--;
|
||||||
let totalCount = 0;
|
let totalCount = 0;
|
||||||
|
|
@ -612,7 +623,11 @@ export default {
|
||||||
open(mode = "add",data,mtype) {
|
open(mode = "add",data,mtype) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.mode = mode;
|
that.mode = mode;
|
||||||
that.mtype = mtype;
|
if(mtype!==undefined&&mtype!==null){
|
||||||
|
that.mtype = mtype;
|
||||||
|
}
|
||||||
|
that.checkedStatus=[];
|
||||||
|
that.selectItems=[];
|
||||||
if(mtype==30){
|
if(mtype==30){
|
||||||
that.change_batch = true;
|
that.change_batch = true;
|
||||||
}
|
}
|
||||||
|
|
@ -621,12 +636,12 @@ export default {
|
||||||
that.totalCount = 0;
|
that.totalCount = 0;
|
||||||
data.forEach((item,index)=>{
|
data.forEach((item,index)=>{
|
||||||
item.wm = item.id;
|
item.wm = item.id;
|
||||||
|
that.checkedStatus.push(true)
|
||||||
|
that.selectItems.push(item.id)
|
||||||
that.totalCount += Number(item.count);
|
that.totalCount += Number(item.count);
|
||||||
that.getWprList(item.wm,index);
|
that.getWprList(item.wm,index);
|
||||||
})
|
})
|
||||||
console.log('that.isFeiPinku',that.isFeiPinku);
|
|
||||||
if(that.isFeiPinku){
|
if(that.isFeiPinku){
|
||||||
console.log('data[0].material',data[0].material);
|
|
||||||
that.form.new_batch = data[0].batch;
|
that.form.new_batch = data[0].batch;
|
||||||
that.form.material_changed = data[0].material;
|
that.form.material_changed = data[0].material;
|
||||||
that.form.material_changed_fname = data[0].material_name;
|
that.form.material_changed_fname = data[0].material_name;
|
||||||
|
|
@ -699,9 +714,19 @@ export default {
|
||||||
that.form.handoverb[index].handoverbw = handoverbw;
|
that.form.handoverb[index].handoverbw = handoverbw;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
checkAllChange(index){
|
||||||
|
this.form.handoverb[index].handoverbw.forEach(item=>{
|
||||||
|
item.checked = this.checkedStatus[index]
|
||||||
|
})
|
||||||
|
},
|
||||||
handleChange(index){
|
handleChange(index){
|
||||||
let trueCount = this.form.handoverb[index].handoverbw.filter(item => item.checked === true).length;
|
let trueCount = this.form.handoverb[index].handoverbw.filter(item => item.checked === true).length;
|
||||||
this.form.handoverb[index].count = trueCount;
|
this.form.handoverb[index].count = trueCount;
|
||||||
|
if(trueCount==this.form.handoverb[index].handoverbw.length){
|
||||||
|
this.checkedStatus[index] = true;
|
||||||
|
}else{
|
||||||
|
this.checkedStatus[index] = false;
|
||||||
|
}
|
||||||
this.countChange();
|
this.countChange();
|
||||||
},
|
},
|
||||||
countChange(){
|
countChange(){
|
||||||
|
|
@ -961,31 +986,46 @@ export default {
|
||||||
that.form.handoverb[indexs].handoverbw.push(obj1);
|
that.form.handoverb[indexs].handoverbw.push(obj1);
|
||||||
}
|
}
|
||||||
}else{//handoverb里没有有这个物料批次
|
}else{//handoverb里没有有这个物料批次
|
||||||
that.materialOptions.forEach((item) => {
|
if(that.new_wm==''){
|
||||||
if(item.id == res[0].wm){
|
that.materialOptions.forEach((item) => {
|
||||||
if(that.type==50){
|
if(item.id == res[0].wm){
|
||||||
that.form.new_batch = item.batch+'-G';
|
if(that.type==50){
|
||||||
|
that.form.new_batch = item.batch+'-G';
|
||||||
|
}
|
||||||
|
let params = {material: item.material,type: that.type};
|
||||||
|
that.$API.wpm.handover.mgroups.req(params).then((res1) => {
|
||||||
|
that.mgroupOptions = res1;
|
||||||
|
})
|
||||||
|
let obj2 = {};
|
||||||
|
obj2.wm = item.id;
|
||||||
|
obj2.batch = item.batch;
|
||||||
|
if(item.material_.process_name){
|
||||||
|
obj2.process = item.material_.process_name;
|
||||||
|
}
|
||||||
|
obj2.count_cando = item.count_canhandover;
|
||||||
|
obj2.handoverbw = [];
|
||||||
|
obj2.count = 1;
|
||||||
|
let obj3 = {};
|
||||||
|
obj3.wpr = res[0].id;
|
||||||
|
obj3.number = res[0].number;
|
||||||
|
obj2.handoverbw.push(obj3);
|
||||||
|
that.form.handoverb.push(obj2);
|
||||||
}
|
}
|
||||||
let params = {material: item.material,type: that.type};
|
})
|
||||||
that.$API.wpm.handover.mgroups.req(params).then((res1) => {
|
}else{
|
||||||
that.mgroupOptions = res1;
|
console.log('res[0]',res[0])
|
||||||
})
|
let obj2 = {};
|
||||||
let obj2 = {};
|
obj2.wm = res[0].wm;
|
||||||
obj2.wm = item.id;
|
obj2.batch = res[0].wm_batch;
|
||||||
obj2.batch = item.batch;
|
obj2.process = res[0].process_name;
|
||||||
if(item.material_.process_name){
|
obj2.handoverbw = [];
|
||||||
obj2.process = item.material_.process_name;
|
obj2.count = 1;
|
||||||
}
|
let obj3 = {};
|
||||||
obj2.count_cando = item.count_canhandover;
|
obj3.wpr = res[0].id;
|
||||||
obj2.handoverbw = [];
|
obj3.number = res[0].number;
|
||||||
obj2.count = 1;
|
obj2.handoverbw.push(obj3);
|
||||||
let obj3 = {};
|
that.form.handoverb.push(obj2);
|
||||||
obj3.wpr = res[0].id;
|
}
|
||||||
obj3.number = res[0].number;
|
|
||||||
obj2.handoverbw.push(obj3);
|
|
||||||
that.form.handoverb.push(obj2);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
that.$message.error("该批次不存在")
|
that.$message.error("该批次不存在")
|
||||||
|
|
|
||||||
|
|
@ -245,6 +245,7 @@
|
||||||
ref="scrapDialog"
|
ref="scrapDialog"
|
||||||
:type="type"
|
:type="type"
|
||||||
:tag="tag"
|
:tag="tag"
|
||||||
|
:new_wm="new_wm"
|
||||||
:wmItem="wmItem"
|
:wmItem="wmItem"
|
||||||
:mgroupName="mgroup_name"
|
:mgroupName="mgroup_name"
|
||||||
:mgroupId="mgroupId"
|
:mgroupId="mgroupId"
|
||||||
|
|
@ -496,6 +497,7 @@ export default {
|
||||||
if(this.selection.length>0){
|
if(this.selection.length>0){
|
||||||
this.selection.forEach(item=>{
|
this.selection.forEach(item=>{
|
||||||
let obj = {};
|
let obj = {};
|
||||||
|
obj.id = item.id;
|
||||||
obj.wm = item.id;
|
obj.wm = item.id;
|
||||||
obj.batch = item.batch;
|
obj.batch = item.batch;
|
||||||
obj.process = item.material_.process_name;
|
obj.process = item.material_.process_name;
|
||||||
|
|
@ -701,6 +703,7 @@ export default {
|
||||||
handleAddWpr(row){
|
handleAddWpr(row){
|
||||||
this.dialog.scrap = true;
|
this.dialog.scrap = true;
|
||||||
this.type = 50;
|
this.type = 50;
|
||||||
|
this.new_wm = row.id;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.wm = row.id;
|
obj.wm = row.id;
|
||||||
obj.batch = row.batch;
|
obj.batch = row.batch;
|
||||||
|
|
@ -710,7 +713,7 @@ export default {
|
||||||
obj.material_name = row.material_name;
|
obj.material_name = row.material_name;
|
||||||
this.wmItem = obj;
|
this.wmItem = obj;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.scrapDialog.open("add");
|
this.$refs.scrapDialog.open("add",'',30);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleWprSuccess(row){},
|
handleWprSuccess(row){},
|
||||||
|
|
|
||||||
|
|
@ -164,9 +164,6 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
style="margin-left: 10px;"
|
style="margin-left: 10px;"
|
||||||
>检验</el-link>
|
>检验</el-link>
|
||||||
<!-- <el-link :underline="false" type="primary"
|
|
||||||
@click="handleWatch(scope.row)"
|
|
||||||
>流程图</el-link> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -234,7 +231,6 @@
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-link :underline="false" @click="printMaterial(scope.row,'wpr')" type="primary">物料标签</el-link>
|
<el-link :underline="false" @click="printMaterial(scope.row,'wpr')" type="primary">物料标签</el-link>
|
||||||
<el-link :underline="false" type="primary" @click="handleAddWpr(scope.row)">添加物料</el-link>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
|
@ -519,6 +515,7 @@ export default {
|
||||||
if(this.selection.length>0){
|
if(this.selection.length>0){
|
||||||
this.selection.forEach(item=>{
|
this.selection.forEach(item=>{
|
||||||
let obj = {};
|
let obj = {};
|
||||||
|
obj.id = item.id;
|
||||||
obj.wm = item.id;
|
obj.wm = item.id;
|
||||||
obj.batch = item.batch;
|
obj.batch = item.batch;
|
||||||
obj.process = item.material_.process_name;
|
obj.process = item.material_.process_name;
|
||||||
|
|
|
||||||
|
|
@ -535,8 +535,10 @@ export default {
|
||||||
this.form.handoverb = [];
|
this.form.handoverb = [];
|
||||||
data.forEach(item=>{
|
data.forEach(item=>{
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.wm = item.id;
|
obj.wm = item.wm;
|
||||||
|
obj.label = item.label;
|
||||||
obj.batch = item.batch;
|
obj.batch = item.batch;
|
||||||
|
obj.count_cando = item.count_canhandover;
|
||||||
obj.count = item.count_canhandover;
|
obj.count = item.count_canhandover;
|
||||||
this.form.handoverb.push(obj);
|
this.form.handoverb.push(obj);
|
||||||
this.totalCount += Number(item.count_canhandover);
|
this.totalCount += Number(item.count_canhandover);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue