Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
feb0e9bb1c
|
@ -444,9 +444,8 @@ export default {
|
|||
//每个人日生产量:个人绩效
|
||||
this.getCount();
|
||||
//车间整体产品统计:最后一个工序的产品统计
|
||||
this.getMaterials();
|
||||
//产品占比:最后一个工序的产品占比
|
||||
this.getMaterials();
|
||||
// this.getMaterials();// this.getmgroupMaterial();
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
@ -526,7 +525,6 @@ export default {
|
|||
//库存统计列表
|
||||
getmgroupMaterial(item) {
|
||||
let that = this;
|
||||
console.log('item',item);
|
||||
let params = { tag: 'done',page_size:1,mgroup: item.id };
|
||||
that.$API.wpm.wmaterial.list.req(params).then((res) => {
|
||||
let obj = {};
|
||||
|
@ -556,13 +554,10 @@ export default {
|
|||
}
|
||||
})
|
||||
let maxNum = valuelist.sort((a, b) => b - a)[0]+2;
|
||||
console.log('maxNum',maxNum);
|
||||
console.log('maxNum',maxNum);
|
||||
let arr = [];
|
||||
valuelist.forEach((item)=>{
|
||||
arr.push(maxNum)
|
||||
})
|
||||
console.log('arr',arr);
|
||||
that.chartOption2.yAxis[0].data = namelist;
|
||||
that.chartOption2.yAxis[1].data = valuelist;
|
||||
that.chartOption2.series[0].data = valuelist;
|
||||
|
@ -580,7 +575,7 @@ export default {
|
|||
let that = this;
|
||||
let params = {
|
||||
page: 0, belong_dept:that.deptId,
|
||||
query: " { id, name, number, model, state ,mgroup_name }"
|
||||
// query: " { id, name, number, model, state ,mgroup_name }"
|
||||
};
|
||||
that.config_middle_bottom.data = [];
|
||||
that.$API.em.equipment.list.req(params).then((res) => {
|
||||
|
@ -588,7 +583,7 @@ export default {
|
|||
res.forEach((item) => {
|
||||
let arr = [];
|
||||
let state_ = that.state_[item.state];
|
||||
let running_state_ = runningStateEnum[scope.row.running_state]?.text;
|
||||
let running_state_ = runningStateEnum[item.running_state]?.text;
|
||||
arr[0] = item.name;
|
||||
arr[1] = item.number;
|
||||
arr[2] = state_;
|
||||
|
@ -603,8 +598,8 @@ export default {
|
|||
let that = this;
|
||||
let date = that.$TOOL.dateFormat(new Date(), "yyyy-MM-dd");
|
||||
let params = {
|
||||
// query: {start_date:date,end_date:date,dept_name:that.deptName},
|
||||
query: {start_date:'2025-06-11',end_date:'2025-06-11',dept_name:that.deptName},
|
||||
query: {start_date:date,end_date:date,dept_name:that.deptName},
|
||||
// query: {start_date:'2025-06-11',end_date:'2025-06-11',dept_name:that.deptName},
|
||||
};
|
||||
let namelist = [],valuelist = [];
|
||||
this.$API.bi.dataset.exec.req("performance", params).then((res) => {
|
||||
|
|
|
@ -706,12 +706,12 @@ export default {
|
|||
let week = nowDate.getDay();//当前时间的week数
|
||||
let weekFirst = week-1;//第一天对应的天数
|
||||
let weekLast = 7-week;//最后一天对应的天数
|
||||
let first = new Date(new Date(nowDate.getTime() - (weekFirst * ondDayTime)));//本周周一
|
||||
let last = new Date(new Date(nowDate.getTime() + (weekLast * ondDayTime)));//本周周日
|
||||
let first = that.$TOOL.dateFormat2(new Date(nowDate.getTime() - (weekFirst * ondDayTime)));//本周周一
|
||||
let last = that.$TOOL.dateFormat2(new Date(nowDate.getTime() + (weekLast * ondDayTime)));//本周周日
|
||||
let objWeek = {query:{
|
||||
start_date:first,end_date:last,mgroup_name:'二次超洗',
|
||||
group_bys_date:',月,周',order_bys_date:',月,周',
|
||||
select_cols_date:', EXTRACT ( MONTH FROM mlog.work_end_time) AS 月,EXTRACT(WEEK FROM mlog.work_end_time) AS 周'
|
||||
select_cols_date:', EXTRACT ( MONTH FROM mlog.handle_date) AS 月,EXTRACT(WEEK FROM mlog.handle_date) AS 周'
|
||||
}};
|
||||
that.$API.bi.dataset.exec.req('lineDay_m2', objWeek).then((res1) => {
|
||||
if(res1.data2.ds0&&res1.data2.ds0.length>0){
|
||||
|
@ -723,7 +723,7 @@ export default {
|
|||
let objMonth = {query:{
|
||||
start_date:start_month,end_date:end_month,mgroup_name:'二次超洗',
|
||||
group_bys_date:',月',order_bys_date:',月',
|
||||
select_cols_date:', EXTRACT ( MONTH FROM mlog.work_end_time) AS 月'
|
||||
select_cols_date:', EXTRACT ( MONTH FROM mlog.handle_date) AS 月'
|
||||
}};
|
||||
that.$API.bi.dataset.exec.req('lineDay_m2', objMonth).then((res2) => {
|
||||
if(res2.data2.ds0&&res2.data2.ds0.length>0){
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="table_add"
|
||||
v-if="mioObj.state == 10"
|
||||
v-if="mioObj.state == 10&&mode!=='show'"
|
||||
>新增</el-button
|
||||
>
|
||||
</div>
|
||||
|
@ -145,6 +145,7 @@
|
|||
fixed="right"
|
||||
align="center"
|
||||
width="150px"
|
||||
v-if=" mode!=='show'"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
|
@ -312,6 +313,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
mode:"add",
|
||||
dialog: {
|
||||
check: false,
|
||||
save: false,
|
||||
|
@ -367,7 +369,8 @@ export default {
|
|||
that.setNameVisible = false;
|
||||
that.$message.success("打印机设置成功,请重新进行打印操作。");
|
||||
},
|
||||
open() {
|
||||
open(mode='add') {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
},
|
||||
getMio() {
|
||||
|
|
|
@ -64,6 +64,14 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料单价">
|
||||
<el-input-number
|
||||
v-model="form.unit_price"
|
||||
:min="0"
|
||||
style="width: 100%;"
|
||||
controls-position="right"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="form.type == 'pur_in'||form.type == 'other_in'||form.type == 'do_out'||form.type=='sale_out'">
|
||||
<el-form-item label="仓库已有批次">
|
||||
|
@ -269,6 +277,8 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let url1 = window.location.href;
|
||||
this.url_code = url1.split('/')[3];
|
||||
let config_base = that.$TOOL.data.get("BASE_INFO").base;
|
||||
that.project_code = config_base.base_code;
|
||||
},
|
||||
|
@ -398,7 +408,7 @@ export default {
|
|||
});
|
||||
},
|
||||
selectChange(item){
|
||||
console.log(item)
|
||||
// console.log(item)
|
||||
let that = this;
|
||||
that.wbatchOptions.forEach((item) => {
|
||||
if(that.form.batch == item.batch){
|
||||
|
@ -411,6 +421,7 @@ export default {
|
|||
var that = this;
|
||||
var type = this.form.type;
|
||||
that.form.material = that.selectObj.id;
|
||||
that.form.batch = that.selectObj.bin_number_main;
|
||||
that.mTracking = that.selectObj.tracking;
|
||||
if (type == "do_in") {
|
||||
if (that.selectObj.is_assemb) {
|
||||
|
@ -511,6 +522,7 @@ export default {
|
|||
}
|
||||
}
|
||||
that.form.mioitemw = that.mioitemw;
|
||||
// console.log(that.form);
|
||||
try {
|
||||
let res;
|
||||
if (that.mode == "add") {
|
||||
|
|
|
@ -0,0 +1,218 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-date-picker
|
||||
v-model="query.mio__inout_date__gte"
|
||||
type="date"
|
||||
placeholder="开始日期"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 150px;"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.mio__inout_date__lte"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="结束日期"
|
||||
style="width: 150px;"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
style="width: 150px;"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main style="padding: 0;">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="params"
|
||||
:query="query"
|
||||
:summary-method="getSummaries"
|
||||
show-summary
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="日期" prop="inout_date">
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编号" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_">{{ scope.row.material_.number }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_">{{ scope.row.material_.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="货位号">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_">{{ scope.row.material_.bin_number_main }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="batch">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_">{{ scope.row.material_.specification }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="品牌型号" prop="batch">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_">{{ scope.row.material_.model }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" prop="batch">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_">{{ scope.row.material_.unit }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库数量" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" prop="unit_price">
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" prop="price">
|
||||
</el-table-column>
|
||||
<el-table-column label="入库人">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.mio_">{{ scope.row.mio_.submit_user_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库凭证号">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.mio_">{{ scope.row.mio_.number }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类别" prop="type">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.mio_">{{ typeDict[scope.row.mio_.type] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" prop="supplier_name">
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "mioitemlist",
|
||||
data() {
|
||||
return {
|
||||
apiObj: null,
|
||||
params: {with_mio:'yes'},
|
||||
selection: [],
|
||||
tableData:[],
|
||||
query: {
|
||||
search: "",
|
||||
mio__inout_date__gte: "",
|
||||
mio__inout_date__lte: "",
|
||||
},
|
||||
stateDict: {
|
||||
10: "创建中",
|
||||
20: "已提交",
|
||||
},
|
||||
typeDict: {
|
||||
do_out: "生产领料",
|
||||
sale_out: "销售发货",
|
||||
pur_in: "采购入库",
|
||||
do_in: "生产入库",
|
||||
other_in: "其他入库",
|
||||
other_out: "其他出库",
|
||||
},
|
||||
project_code:'',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
|
||||
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
|
||||
this.params.mio = this.mioId;
|
||||
|
||||
this.apiObj = this.$API.inm.mioitem.list;
|
||||
},
|
||||
methods: {
|
||||
handleCheckSuccess() {
|
||||
this.$refs.table.refresh();
|
||||
this.dialog.check = false;
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
|
||||
//打印物料标签
|
||||
printMaterial(row,type){
|
||||
let that = this;
|
||||
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||
if(type=='mioitem'){
|
||||
let params = {};
|
||||
params.tid = row.id;
|
||||
params.extra_data={count:row.count};
|
||||
params.label_template_name = '库存标签模板';
|
||||
that.$API.cm.labelmat.fromMioitem.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
}else{
|
||||
let params = {};
|
||||
let name = that.printMaterialName.split('|')[0];
|
||||
params.label_template_name = '单件打印模板';
|
||||
params.data = {number:row.number,name:name};
|
||||
that.$API.cm.labeltemplate.commands.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
});
|
||||
}
|
||||
}else{
|
||||
that.printSetting();
|
||||
}
|
||||
},
|
||||
getSummaries({ columns, data }) {
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = "合计";
|
||||
return;
|
||||
}
|
||||
if (index == 8|| index == 10) {
|
||||
const values = data.map((item) =>
|
||||
Number(item[column.property])
|
||||
);
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr); //Number转换为数值
|
||||
let sum = Number(
|
||||
Number(prev) + Number(curr)
|
||||
).toFixed(2); //toFixed(2)数据项保留两位小数
|
||||
if (!isNaN(value)) {
|
||||
return sum;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,163 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-select
|
||||
v-model="query.type"
|
||||
clearable
|
||||
style="width: 120px; margin-left: 2px"
|
||||
placeholder="出入库类型"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in cateOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.state"
|
||||
clearable
|
||||
style="width: 120px; margin-left: 2px"
|
||||
placeholder="状态"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stateOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
placeholder="编号"
|
||||
clearable
|
||||
style="margin-right: 5px"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
label="记录编号"
|
||||
prop="number"
|
||||
></el-table-column>
|
||||
<el-table-column label="出/入库类型">
|
||||
<template #default="scope">
|
||||
{{ typeDict[scope.row.type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="记录状态">
|
||||
<template #default="scope">
|
||||
{{ stateDict[scope.row.state] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出/入库日期" prop="inout_date">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建人" prop="create_by_name">
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
align="center"
|
||||
width="150px"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="table_detail(scope.row)"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<record-dialog
|
||||
ref="showDrawer"
|
||||
v-if="visibleDrawer"
|
||||
:type="type"
|
||||
:cate="cate"
|
||||
:mioId="mioId"
|
||||
@closed="visibleDrawer = false"
|
||||
>
|
||||
</record-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import recordDialog from "./mioitem.vue";
|
||||
|
||||
export default {
|
||||
name: "mio",
|
||||
components: {
|
||||
recordDialog,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
stateDict: {
|
||||
10: "创建中",
|
||||
20: "已提交",
|
||||
},
|
||||
stateOptions: [
|
||||
{ id: 10, name: "创建中" },
|
||||
{ id: 20, name: "已提交" },
|
||||
],
|
||||
typeDict: {
|
||||
do_out: "生产领料",
|
||||
sale_out: "销售发货",
|
||||
pur_in: "采购入库",
|
||||
do_in: "生产入库",
|
||||
},
|
||||
cateOptions: [
|
||||
{ id: "do_out", name: "生产领料" },
|
||||
{ id: "sale_out", name: "销售发货" },
|
||||
{ id: "pur_in", name: "采购入库" },
|
||||
{ id: "do_in", name: "生产入库" },
|
||||
],
|
||||
dialog: {
|
||||
record: false,
|
||||
},
|
||||
visibleDrawer: false,
|
||||
query: {
|
||||
search: "",
|
||||
},
|
||||
form: {},
|
||||
apiObj: this.$API.inm.mio.list,
|
||||
selection: [],
|
||||
type: "",
|
||||
mioId: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//查看
|
||||
table_detail(row) {
|
||||
this.type = row.type;
|
||||
this.mioId = row.id;
|
||||
this.visibleDrawer = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.showDrawer.open('show');
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -113,6 +113,13 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 光芯 -->
|
||||
<el-col :md="12" :sm="24" v-if="form.type == 40">
|
||||
<el-form-item label="仓库位号">
|
||||
<el-input
|
||||
v-model="form.bin_number_main"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="form.type !== 20">
|
||||
<el-form-item label="物料单价">
|
||||
<el-input-number
|
||||
|
@ -127,6 +134,11 @@
|
|||
<el-switch v-model="form.is_hidden" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="form.type == 40">
|
||||
<el-form-item label="是否进入车间库存">
|
||||
<el-switch v-model="form.into_wm" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="form.type==10||form.type==20">
|
||||
<el-form-item label="产品图纸">
|
||||
<sc-upload v-model="form.photo" :modelValue="form.photo" title="产品图纸"></sc-upload>
|
||||
|
@ -252,6 +264,9 @@ export default {
|
|||
},
|
||||
typeChange(val) {
|
||||
this.getMaterial(val);
|
||||
if(this.form.type == 40) {
|
||||
this.form.into_wm = false;
|
||||
}
|
||||
},
|
||||
//提交
|
||||
submit() {
|
||||
|
@ -300,6 +315,7 @@ export default {
|
|||
that.form.is_hidden = data.is_hidden;
|
||||
that.form.unit_price = data.unit_price;
|
||||
that.form.photo = data.photo;
|
||||
that.form.into_wm = data.into_wm;
|
||||
that.form.photo_number = data.photo_number;
|
||||
}else{
|
||||
Object.assign(this.form, data);
|
||||
|
|
|
@ -107,6 +107,8 @@
|
|||
width="80"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库位号" prop="bin_number_main" v-if="project_code=='gx'">
|
||||
</el-table-column>
|
||||
<el-table-column label="追踪方式" prop="tracking" v-if="project_code=='bxerp'">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.tracking == 10">批次</el-tag>
|
||||
|
|
|
@ -248,13 +248,13 @@ export default {
|
|||
material_start__type:30,
|
||||
},
|
||||
params_mio:{
|
||||
item_mio_w_mioitem_number:'',
|
||||
item_mio__w_mioitem__number:'',
|
||||
},
|
||||
params_mlog:{
|
||||
b_mlog_wmlogb_number:'',
|
||||
b_mlog__w_mlogb__number:'',
|
||||
},
|
||||
params_handover:{
|
||||
b_handover_w_handoverb_number:'',
|
||||
b_handover__w_handoverb__number:'',
|
||||
},
|
||||
stateDict: {
|
||||
10: "创建中",
|
||||
|
@ -293,12 +293,15 @@ export default {
|
|||
that.wprItem = res.wm_;
|
||||
that.wprItem.number = row.number;
|
||||
}
|
||||
that.params_mio.item_mio_w_mioitem_number = row.number;
|
||||
that.params_mlog.b_mlog_wmlogb_number = row.number;
|
||||
that.params_handover.b_handover_w_handoverb_number = row.number;
|
||||
that.params_mio.item_mio__w_mioitem__number = row.number;
|
||||
that.params_mlog.b_mlog__w_mlogb__number = row.number;
|
||||
that.params_handover.b_handover__w_handoverb__number = row.number;
|
||||
that.apiObj_mlog = that.$API.wpm.mlog.list;
|
||||
that.apiObj_handover = that.$API.wpm.handover.list;
|
||||
that.apiObj_mio = that.$API.inm.mio.list;
|
||||
that.$refs.tableMlog.queryData(that.params_mlog);
|
||||
that.$refs.tableHandover.queryData(that.params_handover);
|
||||
that.$refs.tableMio.queryData(that.params_mio);
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
@change="formWminChange(wm_in)"
|
||||
style="width: 300px;margin-left: 10px;"
|
||||
></el-input>
|
||||
<scScanner @scanResult="formWminChange"></scScanner>
|
||||
<!-- <scScanner @scanResult="formWminChange"></scScanner> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="总计:">
|
||||
{{ totalCount }}
|
||||
|
|
|
@ -465,28 +465,35 @@ export default {
|
|||
if(type=='wm'){
|
||||
let params = {};
|
||||
params.tid = row.id;
|
||||
let materialname = row.material_.name + '|' + row.material_.process_name;
|
||||
let specification = row.material_.specification;
|
||||
if(that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){
|
||||
params.label_template_name = '工序带板段号打印模板';
|
||||
that.wprParams.wm = row.id;
|
||||
let numbers = ['','','','','','',''];
|
||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
||||
let leng = res.length;
|
||||
let slice_count = null;//获取这批板段一个板段能切几片?
|
||||
let wprItem = res[0].oinfo;
|
||||
for(let key in wprItem){
|
||||
if(wprItem[key].name=='切片数'){
|
||||
slice_count = wprItem[key].val;
|
||||
}
|
||||
}
|
||||
if(leng>0){
|
||||
let nums = leng/4;
|
||||
let nums = leng/3;
|
||||
for(let i=0;i<nums;i++){
|
||||
let index = i*4;
|
||||
if(index+3<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number+'、'+res[index+2].number+'、'+res[index+3].number;
|
||||
}else if(index+2<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number+'、'+res[index+2].number;
|
||||
let index = i*3;
|
||||
if(index+2<leng){
|
||||
numbers[i] =res[index].number+'('+slice_count+'片)、'+res[index+1].number+'('+slice_count+'片)、'+res[index+2].number+'('+slice_count+'片)';
|
||||
}else if(index+1<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number;
|
||||
numbers[i] =res[index].number+'('+slice_count+'片)、'+res[index+1].number+'('+slice_count+'片)';
|
||||
}else{
|
||||
numbers[i] =res[index].number;
|
||||
numbers[i] =res[index].number+'('+slice_count+'片)';
|
||||
}
|
||||
}
|
||||
}
|
||||
params.extra_data={count:row.count,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]};
|
||||
params.extra_data={materialname:materialname,specification:specification,count:row.count,slicecount:slice_count,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]};
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
|
|
|
@ -466,28 +466,36 @@ export default {
|
|||
if(type=='wm'){
|
||||
let params = {};
|
||||
params.tid = row.id;
|
||||
let materialname = row.material_.name + '|' + row.material_.process_name;
|
||||
let specification = row.material_.specification;
|
||||
if(that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'){
|
||||
console.log('route_code',that.route_code);
|
||||
params.label_template_name = '工序带板段号打印模板';
|
||||
that.wprParams.wm = row.id;
|
||||
let numbers = ['','','','','','',''];
|
||||
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
|
||||
let leng = res.length;
|
||||
let slice_count = null;//获取这批板段一个板段能切几片?
|
||||
let wprItem = res[0].oinfo;
|
||||
for(let key in wprItem){
|
||||
if(wprItem[key].name=='切片数'){
|
||||
slice_count = wprItem[key].val;
|
||||
}
|
||||
}
|
||||
if(leng>0){
|
||||
let nums = leng/4;
|
||||
let nums = leng/3;
|
||||
for(let i=0;i<nums;i++){
|
||||
let index = i*4;
|
||||
if(index+3<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number+'、'+res[index+2].number+'、'+res[index+3].number;
|
||||
}else if(index+2<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number+'、'+res[index+2].number;
|
||||
let index = i*3;
|
||||
if(index+2<leng){
|
||||
numbers[i] =res[index].number+'('+slice_count+'片)、'+res[index+1].number+'('+slice_count+'片)、'+res[index+2].number+'('+slice_count+'片)';
|
||||
}else if(index+1<leng){
|
||||
numbers[i] =res[index].number+'、'+res[index+1].number;
|
||||
numbers[i] =res[index].number+'('+slice_count+'片)、'+res[index+1].number+'('+slice_count+'片)';
|
||||
}else{
|
||||
numbers[i] =res[index].number;
|
||||
numbers[i] =res[index].number+'('+slice_count+'片)';
|
||||
}
|
||||
}
|
||||
}
|
||||
params.extra_data={count:row.count,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]};
|
||||
params.extra_data={materialname:materialname,specification:specification,count:row.count,slicecount:slice_count,numbers0:numbers[0],numbers1:numbers[1],numbers2:numbers[2],numbers3:numbers[3],numbers4:numbers[4],numbers5:numbers[5],numbers6:numbers[6]};
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<scScanner @scanResult="scanClose"></scScanner>
|
||||
<!-- <scScanner @scanResult="scanClose"></scScanner> -->
|
||||
<scan-dialog ref="scanDialog" :closeNow="closeNow" @closed="scanClose"> </scan-dialog>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次" v-if="cate == 'do_out'">
|
||||
|
@ -91,7 +91,7 @@
|
|||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<scScanner @scanResult="scanClose"></scScanner>
|
||||
<!-- <scScanner @scanResult="scanClose"></scScanner> -->
|
||||
<scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="warehouse">
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
<el-button
|
||||
type="danger"
|
||||
@click="table_muser_del(scope.row)"
|
||||
></el-button>
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="物料扫码" style="display: flex;">
|
||||
<scScanner @scanResult="formWminChange"></scScanner>
|
||||
<!-- <scScanner @scanResult="formWminChange"></scScanner> -->
|
||||
<el-input ref="codeInput" v-model="wm_in" clearable @change="formWminChange(wm_in)" style="width: 200px;margin-left: 4px;"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
|
@ -205,7 +205,9 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
apiObj: null,
|
||||
params: { mgroup: "" ,submit_time__isnull:true},
|
||||
params: { mgroup: "" ,submit_time__isnull:true,
|
||||
query: " { id,equipment, material_out_name, equipment_name, reminder_interval_list ,mstate_json,belong_dept_name, mgroup_name,handle_user_name,work_start_time,work_end_time,submit_time}"
|
||||
},
|
||||
query: {submit_time__isnull:true},
|
||||
dialog: {
|
||||
save: false,
|
||||
|
|
|
@ -185,7 +185,7 @@
|
|||
size="small"
|
||||
@click="table_reBack(scope.row)"
|
||||
type="danger"
|
||||
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&scope.row.type == 10&&scope.row.mtype == 10"
|
||||
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&(scope.row.type == 10||scope.row.type == 20)&&scope.row.mtype == 10"
|
||||
>退回</el-button>
|
||||
<el-button
|
||||
link
|
||||
|
@ -403,7 +403,7 @@ export default {
|
|||
that.codeText2 = codeText2;
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add",codeText2,20);
|
||||
this.$refs.saveDialog.open("add",codeText2,10);
|
||||
});
|
||||
},
|
||||
//编辑
|
||||
|
|
|
@ -35,7 +35,26 @@
|
|||
<el-row v-show="addShow">
|
||||
<el-col>
|
||||
<el-form-item label="交接物料">
|
||||
<el-select
|
||||
<xtSelect
|
||||
:apiObj="apiObjM"
|
||||
v-model="form.wm_in"
|
||||
v-model:obj="selectObj"
|
||||
:labelField="'batch'"
|
||||
style="width: 100%;"
|
||||
:params = "paramsM"
|
||||
@change="materialChange0"
|
||||
>
|
||||
<el-table-column label="物料" prop="full_name">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.state==20" style="color: red;border: 1px solid red;border-radius: 3px;">不合格</span>
|
||||
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;">返工</span>
|
||||
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</span>
|
||||
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="count" width="110px"></el-table-column>
|
||||
</xtSelect>
|
||||
<!-- <el-select
|
||||
v-model="selectItems"
|
||||
placeholder="交接物料"
|
||||
filterable
|
||||
|
@ -55,22 +74,22 @@
|
|||
<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-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-for="(listItem,$index) in form.handoverb" :key="listItem">
|
||||
<el-col :span="10">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="交接物料">
|
||||
<el-input v-model="listItem.batch" disabled></el-input>
|
||||
<el-input v-model="listItem.label" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<el-col :span="4">
|
||||
<el-form-item label="总数量">
|
||||
<span>{{ listItem.count_cando }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="交接数量">
|
||||
<el-input-number
|
||||
v-model="listItem.count"
|
||||
|
@ -235,6 +254,9 @@ export default {
|
|||
recive_mgroup: null,
|
||||
handoverb:[],
|
||||
},
|
||||
apiObjM:null,
|
||||
paramsM:{},
|
||||
selectObj:{},
|
||||
rules: {
|
||||
batch: [
|
||||
{
|
||||
|
@ -319,17 +341,22 @@ export default {
|
|||
//获取交接物料
|
||||
if(that.type==20&&that.mgroupName!=='废品库'){
|
||||
//返工交接
|
||||
that.getMaterialRework();
|
||||
// that.getMaterialRework();
|
||||
that.paramsM = {mgroup: that.mgroupId,page: 0,state__in:'20,34',tag : 'done'};
|
||||
}else if(that.type==20&&that.mgroupName=='废品库'){
|
||||
//废品出库
|
||||
that.getMaterialFP();
|
||||
// that.getMaterialFP();
|
||||
that.paramsM = {page: 0,state : 50,state_all: 1};
|
||||
}else if(that.type==40){
|
||||
//报废交接
|
||||
that.getMaterialNotok();
|
||||
// that.getMaterialNotok();
|
||||
that.paramsM = {mgroupx: that.mgroupId,page: 0,state:20};
|
||||
}else{
|
||||
//其他
|
||||
that.getMaterial();
|
||||
that.paramsM = {mgroup: that.mgroupId,page: 0,state:10,tag : 'done'};
|
||||
// that.getMaterial();
|
||||
}
|
||||
that.apiObjM = this.$API.wpm.wmaterial.list;
|
||||
if(that.type==40||that.type==20){
|
||||
that.getMgroupOptions();
|
||||
}else{
|
||||
|
@ -353,32 +380,32 @@ 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);
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
// 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){
|
||||
let that = this;
|
||||
let params = {
|
||||
|
@ -393,45 +420,45 @@ 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;
|
||||
});
|
||||
},
|
||||
// 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;
|
||||
});
|
||||
},
|
||||
// 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() {
|
||||
let that = this;
|
||||
|
@ -521,21 +548,47 @@ export default {
|
|||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
materialChange() {
|
||||
materialChange0(){
|
||||
let that = this;
|
||||
let totalCount = 0;
|
||||
let data = that.materialOptions.filter((item) => {
|
||||
return that.selectItems.indexOf(item.id)>-1;
|
||||
let obj = {};
|
||||
obj.wm = that.selectObj.id;
|
||||
obj.batch = that.selectObj.batch;
|
||||
obj.label = that.selectObj.defect !== null?that.selectObj.batch+'('+that.selectObj.material_name+')'+that.selectObj.defect_name:that.selectObj.batch+'('+that.selectObj.material_name+')';
|
||||
obj.count = that.selectObj.count_cando;
|
||||
obj.defect_name = that.selectObj.defect_name;
|
||||
obj.count_cando = that.selectObj.count_cando;
|
||||
obj.material = that.selectObj.material;
|
||||
if(that.form.handoverb.length>0){
|
||||
let datas = that.form.handoverb.filter((item) => {
|
||||
return item.wm==that.selectObj.id;
|
||||
});
|
||||
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);
|
||||
if(datas.length>0){
|
||||
that.$message.warning('该物料已存在');
|
||||
}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.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(){
|
||||
let that = this;
|
||||
let totalCount = 0;
|
||||
|
@ -628,18 +681,36 @@ export default {
|
|||
if(arr.length>0){
|
||||
that.$message.error("该批次已存在")
|
||||
}else{
|
||||
that.materialOptions.forEach((item) => {
|
||||
if(item.batch == res.batch){
|
||||
let params = {mgroup: that.mgroupId,page: 0,state__in:res.state,search:res.batch,tag : 'done'};
|
||||
if(that.type==10){
|
||||
params.state__in = '10';
|
||||
}else if(that.type==20){
|
||||
params.state__in = '20,34';
|
||||
}
|
||||
that.$API.wpm.wmaterial.list.req(params).then((res1) => {
|
||||
if(res1.length>0){
|
||||
res1.forEach(item=>{
|
||||
let cando = Number(item.count_canhandover);
|
||||
if(cando>0&&item.defect_name==res.defect_name){
|
||||
let obj = {};
|
||||
obj.wm = item.id;
|
||||
obj.batch = item.batch;
|
||||
obj.counts = item.count;
|
||||
obj.count = item.count;
|
||||
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
|
||||
obj.count = item.count_cando;
|
||||
obj.defect_name = item.defect_name;
|
||||
obj.count_cando = item.count_cando;
|
||||
obj.material = item.material;
|
||||
that.form.handoverb.push(obj)
|
||||
that.getResaveMgroups(item.material);
|
||||
that.getResaveMgroups(obj.material);
|
||||
}
|
||||
// else{
|
||||
// that.$message.error("该批次物料没有可交接的数量")
|
||||
// }
|
||||
})
|
||||
}
|
||||
that.codeText = '';
|
||||
});
|
||||
}
|
||||
})
|
||||
//根据扫描内容,获取物料详情匹配当前库存物料
|
||||
this.scanVisible = false;
|
||||
|
|
|
@ -339,7 +339,7 @@
|
|||
:mlog="mlogId"
|
||||
:mgroup="mgroup"
|
||||
:is_fix = "is_fix"
|
||||
:mlogbindefect = "mlogbindefect"
|
||||
:mlogbdefect = "mlogbdefect"
|
||||
:mgroupMtype="mgroupMtype"
|
||||
:mgroupName = "mgroupName"
|
||||
:codeText = "codeText"
|
||||
|
@ -561,7 +561,7 @@ export default {
|
|||
options: [],
|
||||
tableData:[],
|
||||
tableData2:[],
|
||||
mlogbindefect:[],
|
||||
mlogbdefect:[],
|
||||
mlogboutdefect:[],
|
||||
saveInDialog: false,
|
||||
ticketDialog:false,
|
||||
|
@ -699,17 +699,17 @@ export default {
|
|||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
let obj = {};
|
||||
let count_pn_jgqbl = 0,mlogbindefect=[];
|
||||
let count_pn_jgqbl = 0,mlogbdefect=[];
|
||||
that.qct_defects.forEach(item => {
|
||||
count_pn_jgqbl += that.defectinform[item.defect_name] ;
|
||||
let obj = {};
|
||||
obj.defect = item.defect;
|
||||
obj.count = that.defectinform[item.defect_name];
|
||||
obj.mlogb = that.saveInForm.id;
|
||||
mlogbindefect.push(obj);
|
||||
mlogbdefect.push(obj);
|
||||
})
|
||||
obj.count_use = that.saveInForm.count_use;
|
||||
obj.mlogbindefect = mlogbindefect;
|
||||
obj.mlogbdefect = mlogbdefect;
|
||||
obj.count_pn_jgqbl = count_pn_jgqbl;
|
||||
that.$API.wpm.mlogb.updateIn.req(that.saveInForm.id, obj).then((res) => {
|
||||
that.isSaveing = false;
|
||||
|
@ -804,6 +804,7 @@ export default {
|
|||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open();
|
||||
this.codeText = '';
|
||||
});
|
||||
},
|
||||
handleSaveSuccess() {
|
||||
|
|
|
@ -18,6 +18,27 @@
|
|||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item label="批次号" prop="wm_in">
|
||||
<xtSelect
|
||||
:apiObj="apiObjM"
|
||||
v-model="form.wm_in"
|
||||
v-model:obj="selectObj"
|
||||
:labelField="'batch'"
|
||||
style="width: 100%;"
|
||||
:params = "paramsM"
|
||||
>
|
||||
<!-- :params = "{type__in: '10,20',is_hidden: false}" -->
|
||||
<el-table-column label="物料" prop="full_name">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.state==20" style="color: red;border: 1px solid red;border-radius: 3px;">不合格</span>
|
||||
<span v-if="scope.row.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;">返工</span>
|
||||
<span>{{ scope.row.batch }}({{ scope.row.material_name }})</span>
|
||||
<span v-if="scope.row.defect_name !== null" style="color: orangered">{{ scope.row.defect_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="count" width="110px"></el-table-column>
|
||||
</xtSelect>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="批次号" prop="wm_in">
|
||||
<el-select
|
||||
v-model="form.wm_in"
|
||||
placeholder="物料"
|
||||
|
@ -34,6 +55,8 @@
|
|||
>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<div>
|
||||
<span v-if="item.state==20" style="color: red;border: 1px solid red;border-radius: 3px;">不合格</span>
|
||||
<span v-if="item.state==30" style="color: orange;border: 1px solid orange;border-radius: 3px;">返工</span>
|
||||
<span>{{ item.batch }}({{ item.material_name }})</span>
|
||||
<span v-if="item.defect_name !== null" style="color: orangered">{{ item.defect_name }}</span>
|
||||
</div>
|
||||
|
@ -41,7 +64,7 @@
|
|||
</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联任务">
|
||||
|
@ -76,7 +99,7 @@
|
|||
<el-col :md="12" :sm="24">
|
||||
<el-form-item :label="mgroupMtype==10?'领用数量':'批次总数'">
|
||||
<el-input-number
|
||||
v-model="form.count_use"
|
||||
v-model="selectObj.count_cando"
|
||||
:min="0"
|
||||
class="width-100"
|
||||
controls-position="right"
|
||||
|
@ -205,7 +228,7 @@ export default {
|
|||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mlogbindefect:{
|
||||
mlogbdefect:{
|
||||
type:Array,
|
||||
default:()=>[]
|
||||
},
|
||||
|
@ -238,6 +261,7 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
selectObj:{count:0},
|
||||
batch_count:null,
|
||||
codeBatch:"",
|
||||
materialFix:"",
|
||||
|
@ -249,20 +273,37 @@ export default {
|
|||
visible: false,
|
||||
isSaveing: false,
|
||||
setFiltersVisible: false,
|
||||
apiObjM:this.$API.wpm.wmaterial.list,
|
||||
paramsM:{},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
that.paramsM.mtaskx =that.form.mtask;
|
||||
that.paramsM.mgroup = that.mgroup;
|
||||
// that.paramsM.query = "{id,batch,count,material,material_name,defect_name}";
|
||||
that.paramsM.page =0;
|
||||
if(that.is_fix){//来料未完成的返修品&&出料已完成的返修品和不合格品
|
||||
that.paramsM.tag = 'canfix';
|
||||
}else{
|
||||
that.paramsM.material =that.materialIn;
|
||||
that.paramsM.state =10;
|
||||
that.paramsM.tag = 'todo';
|
||||
}
|
||||
if(that.codeText!==''){
|
||||
let id = that.codeText.split('#')[1];
|
||||
this.$API.cm.labelmat.item.req(id).then((res) => {
|
||||
that.codeBatch = res.batch;
|
||||
this.getMaterial();
|
||||
that.paramsM.search = that.codeBatch;
|
||||
that.apiObjM = that.$API.wpm.wmaterial.list;
|
||||
// this.getMaterial();
|
||||
}).catch((err) => {
|
||||
that.getMaterial();
|
||||
that.apiObjM = that.$API.wpm.wmaterial.list;
|
||||
// that.getMaterial();
|
||||
})
|
||||
}else{
|
||||
that.getMaterial();
|
||||
that.apiObjM = that.$API.wpm.wmaterial.list;
|
||||
// that.getMaterial();
|
||||
}
|
||||
if(that.is_fix){}else{
|
||||
this.getdefects();
|
||||
|
@ -292,6 +333,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.mtaskx =that.form.mtask;
|
||||
obj.mgroup = that.mgroup;
|
||||
obj.search = that.codeBatch;
|
||||
// obj.query = "{id,batch,count,material,material_name,defect_name}";
|
||||
obj.page =0;
|
||||
if(that.is_fix){//来料未完成的返修品&&出料已完成的返修品和不合格品
|
||||
obj.tag = 'canfix';
|
||||
|
@ -328,9 +371,9 @@ export default {
|
|||
})
|
||||
that.qct_defects=res.qct_defects;
|
||||
let count_pn_jgqbl = 0;
|
||||
if(data.mlogbindefect.length>0){
|
||||
if(data.mlogbdefect.length>0){
|
||||
that.qct_defects.forEach(item => {
|
||||
data.mlogbindefect.forEach(item2=>{
|
||||
data.mlogbdefect.forEach(item2=>{
|
||||
if(item.defect==item2.defect){
|
||||
count_pn_jgqbl+=item2.count;
|
||||
that.defectform[item.defect_name] = item2.count;
|
||||
|
@ -413,6 +456,8 @@ export default {
|
|||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
that.form.mlog = that.mlog;
|
||||
that.form.batch = that.selectObj.batch;
|
||||
that.form.count_use = that.selectObj.count_cando;
|
||||
if(that.mgroupMtype==10&&that.cellsList.length>0){
|
||||
that.form.count_json_from = that.cellsList;
|
||||
}
|
||||
|
@ -428,6 +473,8 @@ export default {
|
|||
})
|
||||
that.form.mlogbdefect = mlogbdefect;
|
||||
that.form.count_pn_jgqbl = count_pn_jgqbl;
|
||||
console.log(that.form);
|
||||
console.log(that.selectObj);
|
||||
that.$API.wpm.mlogb.in.req(that.form).then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.$emit("success");
|
||||
|
|
Loading…
Reference in New Issue