Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
e0fc8be16b
|
@ -356,6 +356,12 @@ export default {
|
|||
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: {
|
||||
list: {
|
||||
|
|
|
@ -6,7 +6,7 @@ const DEFAULT_CONFIG = {
|
|||
DASHBOARD_URL: "/dashboard",
|
||||
|
||||
//版本号
|
||||
APP_VER: "2.7.2025080716",
|
||||
APP_VER: "2.7.2025082515",
|
||||
|
||||
//内核版本号
|
||||
CORE_VER: "1.6.9",
|
||||
|
|
|
@ -223,3 +223,7 @@ export const actStateEnum = new EnumFactory({
|
|||
4: { text: '已完成', type: 'success' },
|
||||
5: { text: '已关闭', type: 'info' },
|
||||
})
|
||||
|
||||
export const mCateEnum = new EnumFactory({
|
||||
'list': ['主要辅材','办公辅料','设备维护辅料','包装辅材','标识辅材','防护辅材','其他辅材','常规辅材','医护辅材','检测辅材','倒角辅材','减薄辅材','磨抛辅材','多线切辅材','精雕辅材','扫边辅材','黑化辅材']
|
||||
})
|
|
@ -1,22 +1,8 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<!-- <div class="left-panel">
|
||||
<el-select
|
||||
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="left-panel">
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
|
@ -41,7 +27,7 @@
|
|||
v-if="project_code=='gx'"
|
||||
>
|
||||
<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 label="物料编号">
|
||||
<template #default="scope">
|
||||
|
@ -65,24 +51,29 @@
|
|||
<span v-if="scope.row.material_&&scope.row.material_.model">{{ scope.row.material_.model }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--
|
||||
:filters="unitFilters"
|
||||
:filter-method="filterUnitDate"
|
||||
filter-placement="bottom-end"
|
||||
-->
|
||||
<el-table-column label="单位">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_&&scope.row.material_.unit">{{ scope.row.material_.unit }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="安全库存">
|
||||
<el-table-column label="安全库存" sortable>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_&&scope.row.material_.count_safe">{{ scope.row.material_.count_safe }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="count">
|
||||
<el-table-column label="数量" prop="count" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价">
|
||||
<el-table-column label="单价" sortable>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.material_&&scope.row.material_.unit_price">{{ scope.row.material_.unit_price }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" prop="expiration_date">
|
||||
<el-table-column label="总金额" prop="expiration_date" sortable>
|
||||
<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>
|
||||
</template>
|
||||
|
@ -137,6 +128,7 @@ export default {
|
|||
apiObj: this.$API.inm.warehouse.batch,
|
||||
params: { count__gte: 1, material__type__in: "40" },
|
||||
selection: [],
|
||||
unitFilters:[],
|
||||
query: {},
|
||||
warehouseOptions: [],
|
||||
wmtype:0,
|
||||
|
@ -148,13 +140,29 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
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: {
|
||||
getWarehouse() {
|
||||
this.$API.inm.warehouse.list.req({ page: 0 }).then((res) => {
|
||||
this.warehouseOptions = res;
|
||||
});
|
||||
},
|
||||
filterUnitDate(value, row) {
|
||||
return row.单位 === value;
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
|
|
|
@ -7,20 +7,33 @@
|
|||
icon="el-icon-plus"
|
||||
@click="add"
|
||||
v-auth="'material.create'"
|
||||
>新增</el-button
|
||||
>
|
||||
>新增</el-button>
|
||||
<scFileImport
|
||||
:templateUrl="materialTemplate"
|
||||
accept=".xlsx"
|
||||
:apiObj="$API.common.upload"
|
||||
@success="upSuccess"
|
||||
>
|
||||
</scFileImport>
|
||||
></scFileImport>
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
icon="el-icon-download"
|
||||
@click="exportM"
|
||||
:loading="exportLoading"
|
||||
>导出</el-button> -->
|
||||
</div>
|
||||
<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
|
||||
v-model="query.search"
|
||||
placeholder="名称"
|
||||
placeholder="名称/编号/规格/型号"
|
||||
style="width: 250px;"
|
||||
clearable
|
||||
></el-input>
|
||||
<el-button
|
||||
|
@ -40,9 +53,9 @@
|
|||
@row-click="rowClick"
|
||||
>
|
||||
<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 label="物料名称" prop="name">
|
||||
<el-table-column label="物料名称" prop="name" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="specification">
|
||||
</el-table-column>
|
||||
|
@ -57,21 +70,21 @@
|
|||
>隐</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计量单位" prop="unit">
|
||||
<el-table-column label="计量单位" prop="unit" sortable>
|
||||
</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 label="类型" prop="cate">
|
||||
</el-table-column>
|
||||
<el-table-column label="安全库存" prop="count_safe">
|
||||
<el-table-column label="安全库存" prop="count_safe" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" prop="unit_price">
|
||||
<el-table-column label="单价" prop="unit_price" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column label="总价" prop="count_safe">
|
||||
<!-- <el-table-column label="总价" prop="count_safe">
|
||||
<template #default="scope">
|
||||
{{ scope.row.unit_price * scope.row.count }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
v-if="materialType == ''"
|
||||
label="操作"
|
||||
|
@ -121,6 +134,7 @@
|
|||
import scFileImport from "@/components/scFileImport";
|
||||
import saveDialog from "./../mtm/materials_form_gx.vue";
|
||||
import { ElLoading } from "element-plus";
|
||||
import { mCateEnum } from "@/utils/enum.js";
|
||||
|
||||
export default {
|
||||
name: "rparty",
|
||||
|
@ -140,6 +154,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
mCateEnum,
|
||||
project_code : this.$TOOL.data.get("BASE_INFO").base.base_code,
|
||||
materialTemplate: " /media/default/template/material.xlsx",
|
||||
dialog: {
|
||||
|
@ -156,6 +171,7 @@ export default {
|
|||
},
|
||||
materialId: "",
|
||||
materialName: "",
|
||||
exportLoading:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -228,6 +244,18 @@ export default {
|
|||
resetQuery() {
|
||||
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) {
|
||||
close();
|
||||
const loading = ElLoading.service({
|
||||
|
|
|
@ -663,7 +663,7 @@ export default {
|
|||
fullscreen: true,
|
||||
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();
|
||||
this.$message.success("导入成功");
|
||||
this.$refs.table.queryData(this.query);
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in cateOptions"
|
||||
v-for="item in mCateEnum.list"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
|
@ -165,8 +165,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="form.type==10||form.type==20||(form.type==40&&project_code == 'gx')">
|
||||
<el-form-item label="产品图纸">
|
||||
<sc-upload v-model="form.photo" :modelValue="form.photo" title="产品图纸"></sc-upload>
|
||||
<el-form-item label="物料照片">
|
||||
<sc-upload v-model="form.img" :modelValue="form.img" title="物料照片"></sc-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -180,10 +180,12 @@
|
|||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { mCateEnum } from "@/utils/enum.js";
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
mCateEnum,
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
|
@ -245,7 +247,6 @@ export default {
|
|||
{ id: 30, name: "主要原料" },
|
||||
// { id: 40, name: "辅助材料" },
|
||||
],
|
||||
cateOptions: ['主要辅材','办公辅料','设备维护辅料','包装辅材','标识辅材','防护辅材','其他辅材'],
|
||||
handle_user: [],
|
||||
selectionFilters: [],
|
||||
materialOptions: [],
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
@change="processChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
|
@ -46,25 +47,6 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</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-form-item label="输入物料" prop="material_in">
|
||||
<el-select
|
||||
|
@ -153,6 +135,64 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</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-form-item label="计划时长" prop="hour_work">
|
||||
<el-input-number
|
||||
|
@ -267,6 +307,14 @@ export default {
|
|||
{ required: true, message: "请选择工序", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
params_json:{
|
||||
duibian1:0,
|
||||
duibian2:0,
|
||||
changdu1:0,
|
||||
changdu2:0,
|
||||
pbnum:0,
|
||||
pbsigao:0,
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
materialsIn: [],
|
||||
|
@ -278,6 +326,7 @@ export default {
|
|||
titleMap: { add: "新增", edit: "编辑" },
|
||||
setFiltersVisible: false,
|
||||
routeId: "",
|
||||
processName: "",
|
||||
project_code: "",
|
||||
addTemplate:{
|
||||
id:'',
|
||||
|
@ -363,6 +412,14 @@ export default {
|
|||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
processChange(){
|
||||
let that = this;
|
||||
that.options.forEach((item) => {
|
||||
if (item.id == that.form.process) {
|
||||
that.processName = item.name;
|
||||
}
|
||||
})
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
|
@ -371,10 +428,19 @@ export default {
|
|||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form, data);
|
||||
this.routeId = data.id;
|
||||
this.addTemplate.route = data.id;
|
||||
this.getroutemats();
|
||||
let that = this;
|
||||
Object.assign(that.form, data);
|
||||
that.routeId = data.id;
|
||||
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() {
|
||||
|
@ -382,6 +448,9 @@ export default {
|
|||
that.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
if(that.processName=='排一次棒'){
|
||||
that.form.params_json = that.params_json;
|
||||
}
|
||||
if (that.mode === "add") {
|
||||
that.$API.mtm.route.create.req(that.form).then((res) => {
|
||||
that.isSaveing = false;
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
:params="params"
|
||||
:query="params"
|
||||
id="exportDiv"
|
||||
:summary-method="getSummaries"
|
||||
show-summary
|
||||
stripe
|
||||
>
|
||||
<el-table-column type="index" width="50" fixed="left"/>
|
||||
|
@ -49,7 +51,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" class-name="colorheader1">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']?1-scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']:1 }}</span>
|
||||
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']?0:1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
@ -78,14 +80,14 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" class-name="colorheader3">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="可加工" class-name="colorheader3">
|
||||
<el-table-column label="可加工" class-name="colorheader3">
|
||||
<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>
|
||||
</el-table-column> -->
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="暗点" align="center" class-name="colorheader4">
|
||||
<el-table-column label="内标合格" class-name="colorheader4">
|
||||
|
@ -102,7 +104,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="可加工" class-name="colorheader4">
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -147,23 +149,14 @@
|
|||
<span>{{ scope.row.data.毛坯检测_缺陷项_角偏?scope.row.data.毛坯检测_缺陷项_角偏:0 }}</span>
|
||||
</template>
|
||||
</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">
|
||||
<!-- <template #default="scope">
|
||||
<span></span>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column label="内标" class-name="colorheader6">
|
||||
<!-- <template #default="scope">
|
||||
<span></span>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<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 label="备注" align="center" class-name="colorheader7">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.data.毛坯检测_缺陷项_备注 }}</span>
|
||||
|
@ -234,7 +227,96 @@ export default {
|
|||
getCountQt(data,type){
|
||||
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>
|
||||
|
|
|
@ -185,7 +185,7 @@
|
|||
:cate = "cate_type"
|
||||
:process = "process"
|
||||
:mgroupId = "mgroupId"
|
||||
:deptId = " params.belong_dept"
|
||||
:deptId = " deptId"
|
||||
@success="handleinmSuccess"
|
||||
>
|
||||
</save-dialog>
|
||||
|
|
|
@ -671,14 +671,27 @@ export default {
|
|||
});
|
||||
})
|
||||
})
|
||||
}else{
|
||||
if(that.route_code=='paiyicibang'){
|
||||
params.extra_data={orimaterial:row.material_ofrom_name};
|
||||
}else if(that.route_code=='paiyicibang'){
|
||||
that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
|
||||
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 = '排一次棒打印模板';
|
||||
that.apiObjPrint.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{
|
||||
params.extra_data={orimaterial:row.material_ofrom_name,count:row.count};
|
||||
params.label_template_name = '其他工序打印模板';
|
||||
}
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
|
@ -691,6 +704,25 @@ export default {
|
|||
}else if(type=='wpr'){
|
||||
let params = {};
|
||||
let name = row.material_name.split('|')[0];
|
||||
if(that.route_code=='paiyicibang'){
|
||||
that.$API.mtm.route.list.req({material_out:row.material,page:0}).then((res) => {
|
||||
console.log('排一次棒单件打印res',res);
|
||||
let data = res[0].params_json;
|
||||
data.number = row.number;
|
||||
data.name=name;
|
||||
data.ofrom_name=that.ofrom_name;
|
||||
params.data = data;
|
||||
params.label_template_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{
|
||||
if(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||
|
||||
that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo'
|
||||
){
|
||||
|
@ -731,6 +763,7 @@ export default {
|
|||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}else{
|
||||
that.$message.warning("请先设置打印机");
|
||||
}
|
||||
|
|
|
@ -22,12 +22,9 @@
|
|||
<el-descriptions-item label="工段名称">{{
|
||||
mlogItem.mgroup_name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="生产设备">{{
|
||||
<el-descriptions-item label="生产设备" v-if="mlogItem.equipment_name!==null">{{
|
||||
mlogItem.equipment_name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="预计工时">{{
|
||||
mlogItem.hour_work
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="部门/车间">{{
|
||||
mlogItem.belong_dept_name
|
||||
}}</el-descriptions-item>
|
||||
|
@ -366,6 +363,7 @@
|
|||
<el-card v-else style="width: 100%;margin-bottom:1vh" header="输出物料" shadow="never">
|
||||
<check-table
|
||||
v-if="checkTableShow"
|
||||
ref="checkTable"
|
||||
:mlogId="mlogId"
|
||||
:qct="mlogItem.qct"
|
||||
:wm = "wm"
|
||||
|
@ -376,127 +374,11 @@
|
|||
:mgroupName= "mlogItem.mgroup_name"
|
||||
:isSubmit="isSubmit"
|
||||
:batchNumber="batchNumber"
|
||||
:handle_user="handle_user"
|
||||
:handle_date="handle_date"
|
||||
:handle_user="mlogItem.handle_user"
|
||||
:handle_date="mlogItem.handle_date"
|
||||
:processType="processType"
|
||||
style="width: 100%;height: 500px;"
|
||||
></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>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
|
@ -713,15 +595,18 @@ export default {
|
|||
that.$API.wpm.mlog.item.req(that.mlogId).then((res) => {
|
||||
that.mlogItem = res;
|
||||
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){
|
||||
that.getMlogbw();
|
||||
if(that.mlogItem.qct!==null){
|
||||
that.getdefects(that.mlogItem.qct);
|
||||
}
|
||||
}
|
||||
if(res.route!==null){
|
||||
that.hasRoute = true;
|
||||
}
|
||||
that.oinfo_json = [];
|
||||
if(res.oinfo_json_){
|
||||
if(res.oinfo_json_&&res.oinfo_json_!==null){
|
||||
for(let key in res.oinfo_json_){
|
||||
let obj = {};
|
||||
obj.key = key;
|
||||
|
@ -1008,7 +893,11 @@ export default {
|
|||
that.$API.wpm.mlogb.delIn.req(row.id).then((res) => {
|
||||
that.$message.success("操作成功");
|
||||
that.$refs.tableIn.refresh();
|
||||
if(that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==10){
|
||||
that.$refs.tableOut.refresh();
|
||||
}else{
|
||||
that.$refs.checkTable.refreshfun();
|
||||
}
|
||||
//删除in记录后,out也要删除相应的记录
|
||||
});
|
||||
});
|
||||
|
@ -1027,7 +916,6 @@ export default {
|
|||
let that = this;
|
||||
that.mlogb = row.id;
|
||||
that.wm = row.wm_in;
|
||||
that.isSubmit = that.mlogItem.submit_time == null ? false : true;
|
||||
that.batchNumber = row.batch;
|
||||
that.material_in = row.material_in;
|
||||
that.material_out = row.material_out;
|
||||
|
@ -1084,7 +972,11 @@ export default {
|
|||
},
|
||||
handleSaveSuccess() {
|
||||
this.$refs.tableIn.refresh();
|
||||
if(this.mlogItem.material_out_&&this.mlogItem.material_out_.tracking==10){
|
||||
this.$refs.tableOut.refresh();
|
||||
}else{
|
||||
this.$refs.checkTable.refreshfun();
|
||||
}
|
||||
},
|
||||
handleCheckSuccess() {
|
||||
this.$refs.tableOut.refresh();
|
||||
|
@ -1101,7 +993,12 @@ export default {
|
|||
saveMlogbInClose(){
|
||||
this.dialog.save = false;
|
||||
this.$refs.tableIn.refresh();
|
||||
if(this.mlogItem.material_out_&&this.mlogItem.material_out_.tracking==10){
|
||||
this.$refs.tableOut.refresh();
|
||||
}else{
|
||||
this.$refs.checkTable.refreshfun();
|
||||
}
|
||||
|
||||
},
|
||||
//编辑成功后的方法调用
|
||||
handleEditSuccess() {
|
||||
|
|
|
@ -21,11 +21,12 @@
|
|||
<el-col>
|
||||
<el-form-item label="扫码:">
|
||||
<el-input
|
||||
class="inputWrap"
|
||||
ref="codeInput"
|
||||
v-model="wm_in"
|
||||
clearable
|
||||
@change="formWminChange(wm_in)"
|
||||
style="width: 100%;top: -7px;"
|
||||
style="width: 100%;top: -7px;ime-mode:active"
|
||||
></el-input>
|
||||
<span style="color: red;line-height: 12px;font-size: 14px;">*请扫同一批次的物料码</span>
|
||||
</el-form-item>
|
||||
|
@ -80,6 +81,61 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</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-form-item label="工艺路线:">
|
||||
<el-select
|
||||
|
@ -175,6 +231,7 @@ export default {
|
|||
isSaveing: false,
|
||||
batchCountCando:0,
|
||||
materialTracking:10,
|
||||
testitems:[],
|
||||
options: [],
|
||||
bwItemForms: [],
|
||||
routeOptions: [],
|
||||
|
@ -183,6 +240,7 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
this.route_code = this.$route.path.split("/")[2];
|
||||
this.form.handle_date = this.$TOOL.dateFormat2(new Date());
|
||||
this.form.work_start_time = this.$TOOL.dateFormat(new Date());
|
||||
|
@ -190,6 +248,19 @@ export default {
|
|||
this.getMaterial();
|
||||
this.getRoute();
|
||||
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: {
|
||||
//获取工艺步骤
|
||||
|
@ -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") {
|
||||
let that = this;
|
||||
|
@ -362,6 +444,13 @@ export default {
|
|||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
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) => {
|
||||
if(that.bwItemForms.length>0&&that.batchCountCando!==that.bwItemForms.length){
|
||||
that.bwItemForms.forEach(item=>{
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
@selectAllChange="selectAllChange"
|
||||
@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">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.number }}</span>
|
||||
|
@ -249,7 +250,7 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
<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-footer>
|
||||
</el-main>
|
||||
|
@ -437,7 +438,7 @@ export default {
|
|||
}
|
||||
if(that.qct!==''&&that.qct!==null){//输出
|
||||
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.testdefectss(res);
|
||||
}).catch(()=>{
|
||||
|
@ -453,6 +454,9 @@ export default {
|
|||
that.currentDate = that.$TOOL.dateFormat2(new Date());
|
||||
},
|
||||
methods: {
|
||||
refreshfun(){
|
||||
this.getList();
|
||||
},
|
||||
rowAdd(data){
|
||||
let that = this;
|
||||
let years = that.year+'';
|
||||
|
@ -820,55 +824,20 @@ export default {
|
|||
that.isSaveing = true;
|
||||
that.$refs.dialogForm.validate((valid) => {
|
||||
if (valid) {
|
||||
Object.assign(that.setForm,that.form);
|
||||
that.mlogbwlist.forEach(item => {
|
||||
if(item.ftest!==null){
|
||||
item.ftest.ftestdefects.forEach(defect => {
|
||||
if(that.setForm.defectids.indexOf(defect.defect) > -1){
|
||||
defect.test_user = that.setForm.test_user;
|
||||
let obj = {};
|
||||
obj.mlogbw_ids = that.mlogbwlist.map(item => item.id);
|
||||
obj.test_equip = that.form.equipment;
|
||||
obj.test_user = that.form.test_user;
|
||||
obj.test_date = that.handle_date!=null?that.handle_date:that.currentDate;
|
||||
if(that.form.defectids.length>0){
|
||||
obj.defects = that.form.defectids;
|
||||
}
|
||||
})
|
||||
item.ftest.ftestitems.forEach(testitem => {
|
||||
if(that.setForm.testitemids.indexOf(testitem.testitem) > -1){
|
||||
testitem.test_user = that.setForm.test_user;
|
||||
testitem.test_equip = that.setForm.equipment;
|
||||
if(that.form.testitemids.length>0){
|
||||
obj.testitems = that.form.testitemids;
|
||||
}
|
||||
})
|
||||
}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) => {
|
||||
obj.qct = that.qct;
|
||||
that.$API.wpm.mlogbw.start_test.req(obj).then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.form = {};
|
||||
that.checkVisible = false;
|
||||
that.multipleSet = true;
|
||||
|
@ -878,13 +847,11 @@ export default {
|
|||
that.qct_testitems = [];
|
||||
that.qct_testitems = that.testitemlists;
|
||||
that.tableHeight = document.getElementById('mlogbwMain').clientHeight-80;
|
||||
that.isSaveing = false;
|
||||
that.getList();
|
||||
}).catch((err) => {
|
||||
}).catch(() => {
|
||||
that.isSaveing = false;
|
||||
return err;
|
||||
});
|
||||
}
|
||||
})
|
||||
}else{ that.isSaveing = false;}
|
||||
});
|
||||
},
|
||||
saveCancel(){
|
||||
|
|
|
@ -67,11 +67,11 @@
|
|||
<span v-else>{{scope.row.material_out_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="预计工时"
|
||||
prop="hour_work"
|
||||
width="80"
|
||||
></el-table-column>
|
||||
></el-table-column> -->
|
||||
<el-table-column label="批次号" min-width="100">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.mlogb_full!==null">
|
||||
|
|
Loading…
Reference in New Issue