This commit is contained in:
caoqianming 2025-08-27 17:39:30 +08:00
commit e0fc8be16b
15 changed files with 498 additions and 314 deletions

View File

@ -356,6 +356,12 @@ export default {
return await http.delete(`${config.API_URL}/wpm/mlogbw/${id}/`); return await http.delete(`${config.API_URL}/wpm/mlogbw/${id}/`);
}, },
}, },
start_test:{
name: "kuaisu",
req: async function (data) {
return await http.post(`${config.API_URL}/wpm/mlogbw/start_test/`,data);
},
}
}, },
mloguser: { mloguser: {
list: { list: {

View File

@ -6,7 +6,7 @@ const DEFAULT_CONFIG = {
DASHBOARD_URL: "/dashboard", DASHBOARD_URL: "/dashboard",
//版本号 //版本号
APP_VER: "2.7.2025080716", APP_VER: "2.7.2025082515",
//内核版本号 //内核版本号
CORE_VER: "1.6.9", CORE_VER: "1.6.9",

View File

@ -222,4 +222,8 @@ export const actStateEnum = new EnumFactory({
3: { text: '被撤回', type: 'warning' }, 3: { text: '被撤回', type: 'warning' },
4: { text: '已完成', type: 'success' }, 4: { text: '已完成', type: 'success' },
5: { text: '已关闭', type: 'info' }, 5: { text: '已关闭', type: 'info' },
})
export const mCateEnum = new EnumFactory({
'list': ['主要辅材','办公辅料','设备维护辅料','包装辅材','标识辅材','防护辅材','其他辅材','常规辅材','医护辅材','检测辅材','倒角辅材','减薄辅材','磨抛辅材','多线切辅材','精雕辅材','扫边辅材','黑化辅材']
}) })

View File

@ -1,22 +1,8 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<!-- <div class="left-panel"> <div class="left-panel">
<el-select </div>
v-model="query.warehouse"
clearable
placeholder="所在仓库"
@change="handleQuery"
style="width: 150px"
>
<el-option
v-for="item in warehouseOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</div> -->
<div class="right-panel"> <div class="right-panel">
<el-input <el-input
v-model="query.search" v-model="query.search"
@ -41,7 +27,7 @@
v-if="project_code=='gx'" v-if="project_code=='gx'"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="日期" prop="update_time"> <el-table-column label="日期" prop="update_time" sortable>
</el-table-column> </el-table-column>
<el-table-column label="物料编号"> <el-table-column label="物料编号">
<template #default="scope"> <template #default="scope">
@ -65,24 +51,29 @@
<span v-if="scope.row.material_&&scope.row.material_.model">{{ scope.row.material_.model }}</span> <span v-if="scope.row.material_&&scope.row.material_.model">{{ scope.row.material_.model }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!--
:filters="unitFilters"
:filter-method="filterUnitDate"
filter-placement="bottom-end"
-->
<el-table-column label="单位"> <el-table-column label="单位">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.material_&&scope.row.material_.unit">{{ scope.row.material_.unit }}</span> <span v-if="scope.row.material_&&scope.row.material_.unit">{{ scope.row.material_.unit }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="安全库存"> <el-table-column label="安全库存" sortable>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.material_&&scope.row.material_.count_safe">{{ scope.row.material_.count_safe }}</span> <span v-if="scope.row.material_&&scope.row.material_.count_safe">{{ scope.row.material_.count_safe }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" prop="count"> <el-table-column label="数量" prop="count" sortable>
</el-table-column> </el-table-column>
<el-table-column label="单价"> <el-table-column label="单价" sortable>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.material_&&scope.row.material_.unit_price">{{ scope.row.material_.unit_price }}</span> <span v-if="scope.row.material_&&scope.row.material_.unit_price">{{ scope.row.material_.unit_price }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总金额" prop="expiration_date"> <el-table-column label="总金额" prop="expiration_date" sortable>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.material_&&scope.row.material_.unit_price">{{ Number(scope.row.material_.unit_price)*Number(scope.row.count) }}</span> <span v-if="scope.row.material_&&scope.row.material_.unit_price">{{ Number(scope.row.material_.unit_price)*Number(scope.row.count) }}</span>
</template> </template>
@ -137,6 +128,7 @@ export default {
apiObj: this.$API.inm.warehouse.batch, apiObj: this.$API.inm.warehouse.batch,
params: { count__gte: 1, material__type__in: "40" }, params: { count__gte: 1, material__type__in: "40" },
selection: [], selection: [],
unitFilters:[],
query: {}, query: {},
warehouseOptions: [], warehouseOptions: [],
wmtype:0, wmtype:0,
@ -148,7 +140,20 @@ export default {
}; };
}, },
mounted() { mounted() {
let that = this;
this.getWarehouse(); this.getWarehouse();
this.$nextTick(() => {
let datas = this.$refs.table.tableData;
that.unitFilters = [];
datas.forEach(item => {
let unit = item.material_.unit;
console.log(unit);
if(that.unitFilters.indexOf(unit) >-1){}else{
that.unitFilters.push(unit)
}
});
console.log(that.unitFilters);
})
}, },
methods: { methods: {
getWarehouse() { getWarehouse() {
@ -156,6 +161,9 @@ export default {
this.warehouseOptions = res; this.warehouseOptions = res;
}); });
}, },
filterUnitDate(value, row) {
return row.单位 === value;
},
handleQuery() { handleQuery() {
this.$refs.table.queryData(this.query); this.$refs.table.queryData(this.query);
}, },

View File

@ -7,20 +7,33 @@
icon="el-icon-plus" icon="el-icon-plus"
@click="add" @click="add"
v-auth="'material.create'" v-auth="'material.create'"
>新增</el-button >新增</el-button>
>
<scFileImport <scFileImport
:templateUrl="materialTemplate" :templateUrl="materialTemplate"
accept=".xlsx" accept=".xlsx"
:apiObj="$API.common.upload" :apiObj="$API.common.upload"
@success="upSuccess" @success="upSuccess"
> ></scFileImport>
</scFileImport> <!-- <el-button
type="primary"
icon="el-icon-download"
@click="exportM"
:loading="exportLoading"
>导出</el-button> -->
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-select v-model="query.cate" placeholder="辅料类型" style="width: 150px;">
<el-option
v-for="item in mCateEnum.list"
:key="item"
:label="item"
:value="item"
></el-option>
</el-select>
<el-input <el-input
v-model="query.search" v-model="query.search"
placeholder="名称" placeholder="名称/编号/规格/型号"
style="width: 250px;"
clearable clearable
></el-input> ></el-input>
<el-button <el-button
@ -40,9 +53,9 @@
@row-click="rowClick" @row-click="rowClick"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料编号" prop="number"> <el-table-column label="物料编号" prop="number" sortable>
</el-table-column> </el-table-column>
<el-table-column label="物料名称" prop="name"> <el-table-column label="物料名称" prop="name" sortable>
</el-table-column> </el-table-column>
<el-table-column label="规格" prop="specification"> <el-table-column label="规格" prop="specification">
</el-table-column> </el-table-column>
@ -57,21 +70,21 @@
></el-tag> ></el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计量单位" prop="unit"> <el-table-column label="计量单位" prop="unit" sortable>
</el-table-column> </el-table-column>
<el-table-column label="仓库位号" prop="bin_number_main"> <el-table-column label="仓库位号" prop="bin_number_main" sortable>
</el-table-column> </el-table-column>
<el-table-column label="类型" prop="cate"> <el-table-column label="类型" prop="cate">
</el-table-column> </el-table-column>
<el-table-column label="安全库存" prop="count_safe"> <el-table-column label="安全库存" prop="count_safe" sortable>
</el-table-column> </el-table-column>
<el-table-column label="单价" prop="unit_price"> <el-table-column label="单价" prop="unit_price" sortable>
</el-table-column> </el-table-column>
<el-table-column label="总价" prop="count_safe"> <!-- <el-table-column label="总价" prop="count_safe">
<template #default="scope"> <template #default="scope">
{{ scope.row.unit_price * scope.row.count }} {{ scope.row.unit_price * scope.row.count }}
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column <el-table-column
v-if="materialType == ''" v-if="materialType == ''"
label="操作" label="操作"
@ -121,6 +134,7 @@
import scFileImport from "@/components/scFileImport"; import scFileImport from "@/components/scFileImport";
import saveDialog from "./../mtm/materials_form_gx.vue"; import saveDialog from "./../mtm/materials_form_gx.vue";
import { ElLoading } from "element-plus"; import { ElLoading } from "element-plus";
import { mCateEnum } from "@/utils/enum.js";
export default { export default {
name: "rparty", name: "rparty",
@ -140,6 +154,7 @@ export default {
}, },
data() { data() {
return { return {
mCateEnum,
project_code : this.$TOOL.data.get("BASE_INFO").base.base_code, project_code : this.$TOOL.data.get("BASE_INFO").base.base_code,
materialTemplate: " /media/default/template/material.xlsx", materialTemplate: " /media/default/template/material.xlsx",
dialog: { dialog: {
@ -156,6 +171,7 @@ export default {
}, },
materialId: "", materialId: "",
materialName: "", materialName: "",
exportLoading:false,
}; };
}, },
mounted() { mounted() {
@ -228,6 +244,18 @@ export default {
resetQuery() { resetQuery() {
this.query = {}; this.query = {};
}, },
exportM(){
let that = this;
// that.$API.mtm.material.list.req({ page:0}).then((res) => {
// that.tableData = res;
// console.log(that.tableData);
// that.exportLoading = true;
// setTimeout(() => {
// that.$XLSX("#myTable", '');
// that.exportLoading = false;
// }, 1000);
// })
},
upSuccess(res, close) { upSuccess(res, close) {
close(); close();
const loading = ElLoading.service({ const loading = ElLoading.service({

View File

@ -663,7 +663,7 @@ export default {
fullscreen: true, fullscreen: true,
text: "解析中...请稍等", text: "解析中...请稍等",
}); });
this.$API.inm.mio.req(that.mioId, { path: res.path }).then((res) => { this.$API.inm.mio.daorumioitem.req(that.mioId, { path: res.path }).then((res) => {
loading.close(); loading.close();
this.$message.success("导入成功"); this.$message.success("导入成功");
this.$refs.table.queryData(this.query); this.$refs.table.queryData(this.query);

View File

@ -58,7 +58,7 @@
style="width: 100%" style="width: 100%"
> >
<el-option <el-option
v-for="item in cateOptions" v-for="item in mCateEnum.list"
:key="item" :key="item"
:label="item" :label="item"
:value="item" :value="item"
@ -165,8 +165,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24" v-if="form.type==10||form.type==20||(form.type==40&&project_code == 'gx')"> <el-col :md="12" :sm="24" v-if="form.type==10||form.type==20||(form.type==40&&project_code == 'gx')">
<el-form-item label="产品图纸"> <el-form-item label="物料照片">
<sc-upload v-model="form.photo" :modelValue="form.photo" title="产品图纸"></sc-upload> <sc-upload v-model="form.img" :modelValue="form.img" title="物料照片"></sc-upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -180,10 +180,12 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mCateEnum } from "@/utils/enum.js";
export default { export default {
emits: ["success", "closed"], emits: ["success", "closed"],
data() { data() {
return { return {
mCateEnum,
loading: false, loading: false,
mode: "add", mode: "add",
titleMap: { titleMap: {
@ -245,7 +247,6 @@ export default {
{ id: 30, name: "主要原料" }, { id: 30, name: "主要原料" },
// { id: 40, name: "" }, // { id: 40, name: "" },
], ],
cateOptions: ['主要辅材','办公辅料','设备维护辅料','包装辅材','标识辅材','防护辅材','其他辅材'],
handle_user: [], handle_user: [],
selectionFilters: [], selectionFilters: [],
materialOptions: [], materialOptions: [],

View File

@ -24,6 +24,7 @@
clearable clearable
filterable filterable
style="width: 100%" style="width: 100%"
@change="processChange"
> >
<el-option <el-option
v-for="item in options" v-for="item in options"
@ -46,25 +47,6 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :md="12" :sm="24">
<el-form-item label="指定工段">
<el-select
v-model="form.mgroup"
placeholder="物料"
clearable
filterable
style="width: 100%"
>
<el-option
v-for="item in mgroups"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="输入物料" prop="material_in"> <el-form-item label="输入物料" prop="material_in">
<el-select <el-select
@ -153,6 +135,64 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row v-if="project_code=='bxerp'&&processName=='排一次棒'">
<el-col :md="12" :sm="24">
<el-form-item label="一次丝对边">
<el-input-number
v-model="params_json.duibian1"
:min="0"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="二次丝对边">
<el-input-number
v-model="params_json.duibian2"
:min="0"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="一次丝长度">
<el-input-number
v-model="params_json.changdu1"
:min="1"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="二次丝长度">
<el-input-number
v-model="params_json.changdu2"
:min="1"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="排板根数">
<el-input-number
v-model="params_json.pbnum"
:min="1"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="排板丝高">
<el-input-number
v-model="params_json.pbsigao"
:min="1"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="计划时长" prop="hour_work"> <el-form-item label="计划时长" prop="hour_work">
<el-input-number <el-input-number
@ -267,6 +307,14 @@ export default {
{ required: true, message: "请选择工序", trigger: "blur" }, { required: true, message: "请选择工序", trigger: "blur" },
], ],
}, },
params_json:{
duibian1:0,
duibian2:0,
changdu1:0,
changdu2:0,
pbnum:0,
pbsigao:0,
},
visible: false, visible: false,
isSaveing: false, isSaveing: false,
materialsIn: [], materialsIn: [],
@ -278,6 +326,7 @@ export default {
titleMap: { add: "新增", edit: "编辑" }, titleMap: { add: "新增", edit: "编辑" },
setFiltersVisible: false, setFiltersVisible: false,
routeId: "", routeId: "",
processName: "",
project_code: "", project_code: "",
addTemplate:{ addTemplate:{
id:'', id:'',
@ -363,6 +412,14 @@ export default {
}); });
}).catch(() => {}); }).catch(() => {});
}, },
processChange(){
let that = this;
that.options.forEach((item) => {
if (item.id == that.form.process) {
that.processName = item.name;
}
})
},
// //
open(mode = "add") { open(mode = "add") {
this.mode = mode; this.mode = mode;
@ -371,10 +428,19 @@ export default {
}, },
// //
setData(data) { setData(data) {
Object.assign(this.form, data); let that = this;
this.routeId = data.id; Object.assign(that.form, data);
this.addTemplate.route = data.id; that.routeId = data.id;
this.getroutemats(); that.addTemplate.route = data.id;
that.params_json=that.form.params_json;
setTimeout(() => {
that.options.forEach((item) => {
if (item.id == data.process) {
that.processName = item.name;
}
})
},500)
that.getroutemats();
}, },
// //
submit() { submit() {
@ -382,6 +448,9 @@ export default {
that.$refs.dialogForm.validate(async (valid) => { that.$refs.dialogForm.validate(async (valid) => {
if (valid) { if (valid) {
that.isSaveing = true; that.isSaveing = true;
if(that.processName=='排一次棒'){
that.form.params_json = that.params_json;
}
if (that.mode === "add") { if (that.mode === "add") {
that.$API.mtm.route.create.req(that.form).then((res) => { that.$API.mtm.route.create.req(that.form).then((res) => {
that.isSaveing = false; that.isSaveing = false;

View File

@ -31,6 +31,8 @@
:params="params" :params="params"
:query="params" :query="params"
id="exportDiv" id="exportDiv"
:summary-method="getSummaries"
show-summary
stripe stripe
> >
<el-table-column type="index" width="50" fixed="left"/> <el-table-column type="index" width="50" fixed="left"/>
@ -49,7 +51,7 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" class-name="colorheader1"> <el-table-column label="合格数" class-name="colorheader1">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']?1-scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']:1 }}</span> <span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']?0:1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -78,14 +80,14 @@
</el-table-column> </el-table-column>
<el-table-column label="合格数" class-name="colorheader3"> <el-table-column label="合格数" class-name="colorheader3">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']?1-scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']:1 }}</span> <span>{{ !scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']&&!scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm可加工']?1:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="可加工" class-name="colorheader3"> <el-table-column label="可加工" class-name="colorheader3">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']?1-scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']:0 }}</span> <span>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm可加工']?1:0 }}</span>
</template> </template>
</el-table-column> --> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="暗点" align="center" class-name="colorheader4"> <el-table-column label="暗点" align="center" class-name="colorheader4">
<el-table-column label="内标合格" class-name="colorheader4"> <el-table-column label="内标合格" class-name="colorheader4">
@ -102,7 +104,7 @@
</el-table-column> </el-table-column>
<el-table-column label="可加工" class-name="colorheader4"> <el-table-column label="可加工" class-name="colorheader4">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.data.毛坯检测_检测项_暗点==''||scope.row.data.毛坯检测_检测项_暗点==null">1</span> <span v-if="scope.row.data.毛坯检测_检测项_暗点!=='合格'&&scope.row.data.毛坯检测_检测项_暗点!=='不合格'">1</span>
<span v-else>0</span> <span v-else>0</span>
</template> </template>
</el-table-column> </el-table-column>
@ -147,23 +149,14 @@
<span>{{ scope.row.data.毛坯检测_缺陷项_角偏?scope.row.data.毛坯检测_缺陷项_角偏:0 }}</span> <span>{{ scope.row.data.毛坯检测_缺陷项_角偏?scope.row.data.毛坯检测_缺陷项_角偏:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="出口" align="center" class-name="colorheader6"> <!-- <el-table-column label="出口" align="center" class-name="colorheader6">
<el-table-column label="国标" class-name="colorheader6"> <el-table-column label="国标" class-name="colorheader6">
<!-- <template #default="scope">
<span></span>
</template> -->
</el-table-column> </el-table-column>
<el-table-column label="内标" class-name="colorheader6"> <el-table-column label="内标" class-name="colorheader6">
<!-- <template #default="scope">
<span></span>
</template> -->
</el-table-column> </el-table-column>
<el-table-column label="内标放宽" class-name="colorheader6"> <el-table-column label="内标放宽" class-name="colorheader6">
<!-- <template #default="scope">
<span></span>
</template> -->
</el-table-column> </el-table-column>
</el-table-column> </el-table-column> -->
<el-table-column label="备注" align="center" class-name="colorheader7"> <el-table-column label="备注" align="center" class-name="colorheader7">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.毛坯检测_缺陷项_备注 }}</span> <span>{{ scope.row.data.毛坯检测_缺陷项_备注 }}</span>
@ -234,7 +227,96 @@ export default {
getCountQt(data,type){ getCountQt(data,type){
let count_qt = 0,count = 0; let count_qt = 0,count = 0;
} },
getSummaries({ columns, data }) {
const sums = [];
let total = data.length;
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = <p class="count_row">合计<br /><br />比率<br /></p>
return;
}
let propert = '';
if(index == 4&&column.label=='合格数'){
propert= '毛坯检测_缺陷项_放大率¢2mm不合格';
}
if(index == 6&&column.label=='合格数'){
propert= '毛坯检测_缺陷项_放大率¢16mm不合格';
}
if(index == 9&&column.label=='合格数'){
propert= '毛坯检测_缺陷项_剪切¢18.3mm不合格';
}
if(index == 10&&column.label=='可加工'){
propert= '毛坯检测_缺陷项_剪切¢18.3mm可加工';
}
if(index == 11&&column.label=='内标合格'||index == 12&&column.label=='长点不合格'||index == 13&&column.label=='可加工'){
propert= '毛坯检测_检测项_暗点';
}
if(index == 14&&column.label=='暗点重'){
propert= '毛坯检测_缺陷项_暗点重';
}
if(index == 15&&column.label=='花丝'){
propert= '毛坯检测_缺陷项_花丝';
}
if(index == 16&&column.label=='网格'){
propert= '毛坯检测_缺陷项_网格';
}
if(index == 17&&column.label=='花朵'){
propert= '毛坯检测_缺陷项_花朵';
}
if(index == 18&&column.label=='S畸变'){
propert= '毛坯检测_缺陷项_S畸变不合格';
}
if(index == 19&&column.label=='弓形畸变不合格'){
propert= '毛坯检测_缺陷项_弓形畸变不合格';
}
if(index == 20&&column.label=='炸废'){
propert= '毛坯检测_缺陷项_炸废';
}
if(index == 21&&column.label=='角偏'){
propert= '毛坯检测_缺陷项_角偏';
}
if (propert!=='') {
let values = [];
if(index==4||index==6){
values = data.map((item) =>!item.data[propert]?1:0);
}else if(index==9){
values = data.map((item) =>!item.data[propert]&&!item.data['毛坯检测_缺陷项_剪切¢18.3mm可加工']?1:0);
}else if(index==11){
values = data.map((item) =>item.data[propert]=='合格'?1:0);
}else if(index==12){
values = data.map((item) =>item.data[propert]=='不合格'?1:0);
}else if(index==13){
values = data.map((item) =>item.data[propert]!=='合格'&&item.data[propert]!=='不合格'?1:0);
}else{
values = data.map((item) =>item.data[propert]!==undefined?Number(item.data[propert]):0);
}
console.log('values',values);
if (!values.every((value) => Number.isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
let value = Number(curr);
let sum = 0;
sum = Number(Number(prev) + Number(curr));
if (!isNaN(value)) {
// let rate = Number(sum/total*100).toFixed(2);
// return <p class="count_row"><div ref="borrowAmount1">{sum}</div><br /><div ref="borrowAmount2">{rate}</div></p>
return sum;
} else {
// let rate = Number(prev/total*100).toFixed(2);
// return <p class="count_row"><div ref="borrowAmount1">{prev}</div><br /><div ref="borrowAmount2">{rate}</div></p>
return prev;
}
}, 0);
} else{
sums[index] = <p class="count_row"><div ref="borrowAmount1">0</div><br /><div ref="borrowAmount2">0</div></p>
}
sums[index] =
<p class="count_row"><div ref="borrowAmount1">{sums[index]}</div><br /><div ref="borrowAmount2">{Number(sums[index]/total*100).toFixed(2)}%</div></p>
}
});
return sums;
},
}, },
}; };
</script> </script>

View File

@ -185,7 +185,7 @@
:cate = "cate_type" :cate = "cate_type"
:process = "process" :process = "process"
:mgroupId = "mgroupId" :mgroupId = "mgroupId"
:deptId = " params.belong_dept" :deptId = " deptId"
@success="handleinmSuccess" @success="handleinmSuccess"
> >
</save-dialog> </save-dialog>

View File

@ -671,14 +671,27 @@ export default {
}); });
}) })
}) })
}else{ }else if(that.route_code=='paiyicibang'){
if(that.route_code=='paiyicibang'){ that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
params.extra_data={orimaterial:row.material_ofrom_name}; let namearr = row.material_name.split('排一次棒');
let extra_data = res[0].params_json;
extra_data.batch = row.batch;
extra_data.material_name=namearr[0];
extra_data.orimaterial=row.material_ofrom_name;
params.extra_data = extra_data;
params.label_template_name = '排一次棒打印模板'; params.label_template_name = '排一次棒打印模板';
}else{ that.apiObjPrint.req(params).then((res) => {
params.extra_data={orimaterial:row.material_ofrom_name,count:row.count}; let obj = {};
params.label_template_name = '其他工序打印模板'; obj.printer_commands = res.commands;
} obj.printer_name = that.printer_name;
that.$API.wpm.prints.req(obj).then((response) => {
that.$message.success("打印成功");
});
});
})
}else{
params.extra_data={orimaterial:row.material_ofrom_name,count:row.count};
params.label_template_name = '其他工序打印模板';
that.apiObjPrint.req(params).then((res) => { that.apiObjPrint.req(params).then((res) => {
let obj = {}; let obj = {};
obj.printer_commands = res.commands; obj.printer_commands = res.commands;
@ -691,45 +704,65 @@ export default {
}else if(type=='wpr'){ }else if(type=='wpr'){
let params = {}; let params = {};
let name = row.material_name.split('|')[0]; let name = row.material_name.split('|')[0];
if(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'|| if(that.route_code=='paiyicibang'){
that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo' that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
){ console.log('排一次棒单件打印res',res);
let oinfo = []; let data = res[0].params_json;
for(let key in row.oinfo){ data.number = row.number;
oinfo.push(row.oinfo[key]) data.name=name;
} data.ofrom_name=that.ofrom_name;
let data = {sigao:'',duibian:'',moban:'',istest:'否',number:row.number,name:name,ofrom_name:that.ofrom_name,ofrom_batch:that.ofrom_batch}; params.data = data;
if(that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){ params.label_template_name = '排一次棒单件打印模板';
params.label_template_name = '脱膜测量单件标签模板'; that.$API.cm.labeltemplate.commands.req(params).then((res) => {
}else{ let obj = {};
params.label_template_name = '排扳单件打印模板'; obj.printer_commands = res.commands;
} obj.printer_name = that.printer_name;
if(oinfo.length>0){ that.$API.wpm.prints.req(obj).then((response) => {
oinfo.forEach((item)=>{ that.$message.success("打印成功");
if(item.name=="丝高"){ });
data.sigao = item.val; });
}else if(item.name=="对边"){ })
data.duibian = item.val;
}else if(item.name=="模具号"){
data.moban = item.val;
}else if(item.name=="实验板段"){
data.istest = item.val?'是':'否';
}
})
}
params.data = data;
}else{ }else{
params.label_template_name = '单件打印模板'; if(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||
params.data = {number:row.number,name:name}; that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo'
} ){
that.$API.cm.labeltemplate.commands.req(params).then((res) => { let oinfo = [];
let obj = {}; for(let key in row.oinfo){
obj.printer_commands = res.commands; oinfo.push(row.oinfo[key])
obj.printer_name = that.printer_name; }
that.$API.wpm.prints.req(obj).then((response) => { let data = {sigao:'',duibian:'',moban:'',istest:'否',number:row.number,name:name,ofrom_name:that.ofrom_name,ofrom_batch:that.ofrom_batch};
that.$message.success("打印成功"); if(that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'){
params.label_template_name = '脱膜测量单件标签模板';
}else{
params.label_template_name = '排扳单件打印模板';
}
if(oinfo.length>0){
oinfo.forEach((item)=>{
if(item.name=="丝高"){
data.sigao = item.val;
}else if(item.name=="对边"){
data.duibian = item.val;
}else if(item.name=="模具号"){
data.moban = item.val;
}else if(item.name=="实验板段"){
data.istest = item.val?'是':'否';
}
})
}
params.data = data;
}else{
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{ }else{
that.$message.warning("请先设置打印机"); that.$message.warning("请先设置打印机");

View File

@ -22,12 +22,9 @@
<el-descriptions-item label="工段名称">{{ <el-descriptions-item label="工段名称">{{
mlogItem.mgroup_name mlogItem.mgroup_name
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="生产设备">{{ <el-descriptions-item label="生产设备" v-if="mlogItem.equipment_name!==null">{{
mlogItem.equipment_name mlogItem.equipment_name
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="预计工时">{{
mlogItem.hour_work
}}</el-descriptions-item>
<el-descriptions-item label="部门/车间">{{ <el-descriptions-item label="部门/车间">{{
mlogItem.belong_dept_name mlogItem.belong_dept_name
}}</el-descriptions-item> }}</el-descriptions-item>
@ -366,6 +363,7 @@
<el-card v-else style="width: 100%;margin-bottom:1vh" header="输出物料" shadow="never"> <el-card v-else style="width: 100%;margin-bottom:1vh" header="输出物料" shadow="never">
<check-table <check-table
v-if="checkTableShow" v-if="checkTableShow"
ref="checkTable"
:mlogId="mlogId" :mlogId="mlogId"
:qct="mlogItem.qct" :qct="mlogItem.qct"
:wm = "wm" :wm = "wm"
@ -376,127 +374,11 @@
:mgroupName= "mlogItem.mgroup_name" :mgroupName= "mlogItem.mgroup_name"
:isSubmit="isSubmit" :isSubmit="isSubmit"
:batchNumber="batchNumber" :batchNumber="batchNumber"
:handle_user="handle_user" :handle_user="mlogItem.handle_user"
:handle_date="handle_date" :handle_date="mlogItem.handle_date"
:processType="processType" :processType="processType"
style="width: 100%;height: 500px;" style="width: 100%;height: 500px;"
></check-table> ></check-table>
<!-- <sc-form-table
hideDelete
id="mlogbwlist"
v-model="mlogbwlist"
:addTemplate="addTemplate"
placeholder="暂无数据"
:hideAdd="hideAdd"
>
<el-table-column prop="mlogb__batch" label="物料批次" fixed min-width="80px">
</el-table-column>
<el-table-column prop="number" label="物料编号" fixed min-width="80px">
</el-table-column>
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id" width="150px">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row[item.testitem_name] }}</span>
<el-input-number
v-if="item.testitem_field_type=='input-number'&&scope.row.isEdit"
v-model="scope.row[item.testitem_name]"
class="width-100"
controls-position="right"
@change="defectCountSun(scope.row)"
></el-input-number>
<el-input-number
v-if="item.testitem_field_type=='input-int'&&scope.row.isEdit"
v-model="scope.row[item.testitem_name]"
:min="0"
class="width-100"
controls-position="right"
@change="defectCountSun(scope.row)"
></el-input-number>
<el-input
v-if="item.testitem_field_type=='input-text'&&scope.row.isEdit"
v-model="scope.row[item.testitem_name]"
class="width-100"
@change="defectCountSun(scope.row)"
></el-input>
<el-select
v-if="item.testitem_field_type=='select-text'&&scope.row.isEdit"
v-model="scope.row[item.testitem_name]"
clearable
class="width-100"
@change="defectCountSun(scope.row)"
>
<el-option
v-for="item0 in item.testitem_choices"
:key="item0"
:label="item0"
:value="item0"
></el-option>
</el-select>
<el-select
v-if="item.testitem_field_type=='selects-text'&&scope.row.isEdit"
v-model="scope.row[item.testitem_name]"
clearable
multiple
class="width-100"
@change="defectCountSun(scope.row)"
>
<el-option
v-for="item1 in item.testitem_choices"
:key="item1"
:label="item1"
:value="item1"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="note" :label="item.defect_name" v-for="item in qct_defects" :key="item.id" width="120px">
<template #default="scope">
<el-switch
:disabled="!scope.row.isEdit"
v-model="scope.row[item.defect_name]"
style="--el-switch-on-color: red"
@change="switchChange(scope.row, item)"
></el-switch>
</template>
</el-table-column>
<el-table-column prop="note" label="备注" width="80px">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row.note }}</span>
<el-input v-else v-model="scope.row.note" placeholder="备注"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="160" align="center" fixed="right" v-if="!isSubmit">
<template #default="scope">
<el-button
v-if="scope.row.isEdit"
type="success"
@click="formTableSave(scope.row)"
>保存</el-button>
<el-button
v-if="scope.row.isEdit&&scope.row.id"
type="danger"
style="margin-left: 5px;"
@click="formTableCancel(scope.row)"
>取消</el-button>
<el-button
v-if="!scope.row.isEdit"
type="primary"
@click="formTableEdit(scope.row)"
>编辑</el-button>
<el-button
v-if="scope.row.isEdit&&!scope.row.id"
type="danger"
style="margin-left: 5px;"
@click="formTableDelet(scope.row)"
>删除</el-button>
<el-button
v-if="!scope.row.isEdit"
type="danger"
style="margin-left: 5px;"
@click="formTableDel(scope.row.id)"
>删除</el-button>
</template>
</el-table-column>
</sc-form-table> -->
</el-card> </el-card>
<save-dialog <save-dialog
v-if="dialog.save" v-if="dialog.save"
@ -713,15 +595,18 @@ export default {
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => { that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
that.mlogItem = res; that.mlogItem = res;
that.checkTableShow = true; that.checkTableShow = true;
that.isSubmit = res.submit_time==null?false:true;
if(that.processType=='10'&&that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==20){ if(that.processType=='10'&&that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==20){
that.getMlogbw(); that.getMlogbw();
that.getdefects(that.mlogItem.qct); if(that.mlogItem.qct!==null){
that.getdefects(that.mlogItem.qct);
}
} }
if(res.route!==null){ if(res.route!==null){
that.hasRoute = true; that.hasRoute = true;
} }
that.oinfo_json = []; that.oinfo_json = [];
if(res.oinfo_json_){ if(res.oinfo_json_&&res.oinfo_json_!==null){
for(let key in res.oinfo_json_){ for(let key in res.oinfo_json_){
let obj = {}; let obj = {};
obj.key = key; obj.key = key;
@ -1008,7 +893,11 @@ export default {
that.$API.wpm.mlogb.delIn.req(row.id).then((res) => { that.$API.wpm.mlogb.delIn.req(row.id).then((res) => {
that.$message.success("操作成功"); that.$message.success("操作成功");
that.$refs.tableIn.refresh(); that.$refs.tableIn.refresh();
that.$refs.tableOut.refresh(); if(that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==10){
that.$refs.tableOut.refresh();
}else{
that.$refs.checkTable.refreshfun();
}
//inout //inout
}); });
}); });
@ -1027,7 +916,6 @@ export default {
let that = this; let that = this;
that.mlogb = row.id; that.mlogb = row.id;
that.wm = row.wm_in; that.wm = row.wm_in;
that.isSubmit = that.mlogItem.submit_time == null ? false : true;
that.batchNumber = row.batch; that.batchNumber = row.batch;
that.material_in = row.material_in; that.material_in = row.material_in;
that.material_out = row.material_out; that.material_out = row.material_out;
@ -1084,7 +972,11 @@ export default {
}, },
handleSaveSuccess() { handleSaveSuccess() {
this.$refs.tableIn.refresh(); this.$refs.tableIn.refresh();
this.$refs.tableOut.refresh(); if(this.mlogItem.material_out_&&this.mlogItem.material_out_.tracking==10){
this.$refs.tableOut.refresh();
}else{
this.$refs.checkTable.refreshfun();
}
}, },
handleCheckSuccess() { handleCheckSuccess() {
this.$refs.tableOut.refresh(); this.$refs.tableOut.refresh();
@ -1101,7 +993,12 @@ export default {
saveMlogbInClose(){ saveMlogbInClose(){
this.dialog.save = false; this.dialog.save = false;
this.$refs.tableIn.refresh(); this.$refs.tableIn.refresh();
this.$refs.tableOut.refresh(); if(this.mlogItem.material_out_&&this.mlogItem.material_out_.tracking==10){
this.$refs.tableOut.refresh();
}else{
this.$refs.checkTable.refreshfun();
}
}, },
// //
handleEditSuccess() { handleEditSuccess() {

View File

@ -21,11 +21,12 @@
<el-col> <el-col>
<el-form-item label="扫码:"> <el-form-item label="扫码:">
<el-input <el-input
class="inputWrap"
ref="codeInput" ref="codeInput"
v-model="wm_in" v-model="wm_in"
clearable clearable
@change="formWminChange(wm_in)" @change="formWminChange(wm_in)"
style="width: 100%;top: -7px;" style="width: 100%;top: -7px;ime-mode:active"
></el-input> ></el-input>
<span style="color: red;line-height: 12px;font-size: 14px;">*请扫同一批次的物料码</span> <span style="color: red;line-height: 12px;font-size: 14px;">*请扫同一批次的物料码</span>
</el-form-item> </el-form-item>
@ -80,6 +81,61 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24" v-for="item in testitems" :key="item.id">
<el-form-item :label="item.name">
<el-input-number
v-if="item.field_type=='input-number'"
v-model="item.value"
:min="0"
class="width-100"
controls-position="right"
>
</el-input-number>
<el-input-number
v-if="item.field_type=='input-int'"
v-model="item.value"
:min="0"
class="width-100"
controls-position="right"
>
</el-input-number>
<el-input
v-if="item.field_type=='input-text'"
v-model="item.value"
class="width-100"
>
</el-input>
<el-select
v-if="item.field_type=='select-text'"
v-model="item.value"
clearable
class="width-100"
>
<el-option
v-for="item0 in item.choices"
:key="item0"
:label="item0"
:value="item0"
>
</el-option>
</el-select>
<el-select
v-if="item.field_type=='selects-text'"
v-model="item.value"
clearable
multiple
class="width-100"
>
<el-option
v-for="item1 in item.choices"
:key="item1"
:label="item1"
:value="item1"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="工艺路线:"> <el-form-item label="工艺路线:">
<el-select <el-select
@ -175,6 +231,7 @@ export default {
isSaveing: false, isSaveing: false,
batchCountCando:0, batchCountCando:0,
materialTracking:10, materialTracking:10,
testitems:[],
options: [], options: [],
bwItemForms: [], bwItemForms: [],
routeOptions: [], routeOptions: [],
@ -183,6 +240,7 @@ export default {
}; };
}, },
mounted() { mounted() {
let that = this;
this.route_code = this.$route.path.split("/")[2]; this.route_code = this.$route.path.split("/")[2];
this.form.handle_date = this.$TOOL.dateFormat2(new Date()); this.form.handle_date = this.$TOOL.dateFormat2(new Date());
this.form.work_start_time = this.$TOOL.dateFormat(new Date()); this.form.work_start_time = this.$TOOL.dateFormat(new Date());
@ -190,6 +248,19 @@ export default {
this.getMaterial(); this.getMaterial();
this.getRoute(); this.getRoute();
this.getEquipment(); this.getEquipment();
this.gettestitem();
setTimeout(()=>{
let inputDom = document.querySelectorAll('.inputWrap .el-input__wrapper .el-input__inner');
console.log(inputDom);
inputDom.forEach(function(input) {
input.addEventListener("compositionstart", function() {
// that.$confirm(``, "", {
// type: "warning",
// }).then(() => {});
that.$message.warning("您的输入法为中文,请切换到英文输入法");
});
});
},500)
}, },
methods: { methods: {
// //
@ -211,6 +282,17 @@ export default {
}); });
}); });
}, },
gettestitem(){
let that = this;
that.$API.qm.testitem.list.req({ process: that.process,type:20 }).then((res) => {
res.results.forEach((item) => {
let obj = {};
Object.assign(obj, item);
obj.value = '';
that.testitems.push(obj);
})
});
},
// //
open(mode = "add") { open(mode = "add") {
let that = this; let that = this;
@ -362,6 +444,13 @@ export default {
if (valid) { if (valid) {
that.isSaveing = true; that.isSaveing = true;
that.form.mgroup = that.mgroup; that.form.mgroup = that.mgroup;
if(that.testitems.length>0){
let oinfo_json = {};
that.testitems.forEach((item) => {
oinfo_json[item.id] = item.value;
})
that.form.oinfo_json = oinfo_json;
}
that.$API.wpm.mlog.quick.req(that.form).then((res) => { that.$API.wpm.mlog.quick.req(that.form).then((res) => {
if(that.bwItemForms.length>0&&that.batchCountCando!==that.bwItemForms.length){ if(that.bwItemForms.length>0&&that.batchCountCando!==that.bwItemForms.length){
that.bwItemForms.forEach(item=>{ that.bwItemForms.forEach(item=>{

View File

@ -33,6 +33,7 @@
@selectAllChange="selectAllChange" @selectAllChange="selectAllChange"
@add="rowAdd" @add="rowAdd"
> >
<el-table-column prop="mlogb__batch" label="物料批次" fixed min-width="80px"></el-table-column>
<el-table-column prop="number" label="物料编号" fixed min-width="80px"> <el-table-column prop="number" label="物料编号" fixed min-width="80px">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.number }}</span> <span>{{ scope.row.number }}</span>
@ -249,7 +250,7 @@
</el-row> </el-row>
</el-form> </el-form>
<el-footer> <el-footer>
<el-button type="primary" :loading="isSaveing" @click.stop="checkSetting" save>确定</el-button> <el-button type="primary" v-loading="isSaveing" @click.stop="checkSetting" save>确定</el-button>
<el-button @click="saveCancel">取消</el-button> <el-button @click="saveCancel">取消</el-button>
</el-footer> </el-footer>
</el-main> </el-main>
@ -437,7 +438,7 @@ export default {
} }
if(that.qct!==''&&that.qct!==null){// if(that.qct!==''&&that.qct!==null){//
that.getdefects(); that.getdefects();
}else{ }else if(that.material_out!==''&&that.material_out!==null){//
that.$API.qm.qct.getQct.req({ material: that.material_out,type:'out',tag:'process' }).then((res) => { that.$API.qm.qct.getQct.req({ material: that.material_out,type:'out',tag:'process' }).then((res) => {
that.testdefectss(res); that.testdefectss(res);
}).catch(()=>{ }).catch(()=>{
@ -453,6 +454,9 @@ export default {
that.currentDate = that.$TOOL.dateFormat2(new Date()); that.currentDate = that.$TOOL.dateFormat2(new Date());
}, },
methods: { methods: {
refreshfun(){
this.getList();
},
rowAdd(data){ rowAdd(data){
let that = this; let that = this;
let years = that.year+''; let years = that.year+'';
@ -820,55 +824,20 @@ export default {
that.isSaveing = true; that.isSaveing = true;
that.$refs.dialogForm.validate((valid) => { that.$refs.dialogForm.validate((valid) => {
if (valid) { if (valid) {
Object.assign(that.setForm,that.form); let obj = {};
that.mlogbwlist.forEach(item => { obj.mlogbw_ids = that.mlogbwlist.map(item => item.id);
if(item.ftest!==null){ obj.test_equip = that.form.equipment;
item.ftest.ftestdefects.forEach(defect => { obj.test_user = that.form.test_user;
if(that.setForm.defectids.indexOf(defect.defect) > -1){ obj.test_date = that.handle_date!=null?that.handle_date:that.currentDate;
defect.test_user = that.setForm.test_user; if(that.form.defectids.length>0){
} obj.defects = that.form.defectids;
}) }
item.ftest.ftestitems.forEach(testitem => { if(that.form.testitemids.length>0){
if(that.setForm.testitemids.indexOf(testitem.testitem) > -1){ obj.testitems = that.form.testitemids;
testitem.test_user = that.setForm.test_user; }
testitem.test_equip = that.setForm.equipment; obj.qct = that.qct;
} that.$API.wpm.mlogbw.start_test.req(obj).then((res) => {
}) that.isSaveing = false;
}else{
let ftest = {};
ftest.ftestitems = [];
ftest.ftestdefects = [];
ftest.qct = that.qct;
ftest.test_date =that.handle_date!=null?that.handle_date:that.currentDate;
ftest.test_user = that.handle_user;
that.qct_defects.forEach((item0) => {
let itemObj = {};
itemObj.defect = item0.defect;
itemObj.has = false;
if(that.setForm.defectids.indexOf(item0.defect) > -1){
itemObj.test_user = that.setForm.test_user;
}else{
itemObj.test_user = that.handle_user;
}
ftest.ftestdefects.push(itemObj);
})
that.qct_testitems.forEach((item1) => {
let itemObj1 = {};
itemObj1.testitem = item1.testitem;
itemObj1.addto_wpr = item1.addto_wpr;
itemObj1.test_val_json = "";
if(that.setForm.testitemids.indexOf(item1.testitem) > -1){
itemObj1.test_user = that.setForm.test_user;
itemObj1.test_equip = that.setForm.equipment;
}else{
itemObj1.test_user = that.handle_user;
}
ftest.ftestitems.push(itemObj1);
})
item.ftest = ftest;
}
});
that.$API.wpm.mlogbw.update.req("bulk",that.mlogbwlist).then((res) => {
that.form = {}; that.form = {};
that.checkVisible = false; that.checkVisible = false;
that.multipleSet = true; that.multipleSet = true;
@ -878,13 +847,11 @@ export default {
that.qct_testitems = []; that.qct_testitems = [];
that.qct_testitems = that.testitemlists; that.qct_testitems = that.testitemlists;
that.tableHeight = document.getElementById('mlogbwMain').clientHeight-80; that.tableHeight = document.getElementById('mlogbwMain').clientHeight-80;
that.isSaveing = false;
that.getList(); that.getList();
}).catch((err) => { }).catch(() => {
that.isSaveing = false; that.isSaveing = false;
return err; })
}); }else{ that.isSaveing = false;}
}
}); });
}, },
saveCancel(){ saveCancel(){

View File

@ -67,11 +67,11 @@
<span v-else>{{scope.row.material_out_name}}</span> <span v-else>{{scope.row.material_out_name}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
label="预计工时" label="预计工时"
prop="hour_work" prop="hour_work"
width="80" width="80"
></el-table-column> ></el-table-column> -->
<el-table-column label="批次号" min-width="100"> <el-table-column label="批次号" min-width="100">
<template #default="scope"> <template #default="scope">
<div v-if="scope.row.mlogb_full!==null"> <div v-if="scope.row.mlogb_full!==null">