This commit is contained in:
TianyangZhang 2025-12-19 13:26:35 +08:00
commit 53f8e8f91b
34 changed files with 850 additions and 201 deletions

View File

@ -11,6 +11,7 @@
<script>
import colorTool from "@/utils/color";
import i18n from '@/locales'
export default {
name: "App",
data() {
@ -26,7 +27,8 @@ export default {
},
computed: {
locale() {
return this.$i18n.messages[this.$i18n.locale].el;
const lang = i18n.global.locale.value
return i18n.global.messages.value?.[lang]?.el
},
},
created() {

View File

@ -255,4 +255,36 @@ export default {
}
},
},
repair: {
list: {
req: async function(data){
return await http.get(
`${config.API_URL}/em/repair/`,
data
);
}
},
item: {
req: async function(id){
return await http.get(
`${config.API_URL}/em/repair/${id}/`
);
}
},
create: {
name: "创建",
req: async function(data){
return await http.post(
`${config.API_URL}/em/repair/`,
data);
}
},
delete: {
name: "删除",
req: async function(id){
return await http.delete(
`${config.API_URL}/em/repair/${id}/`);
}
},
}
}

View File

@ -21,8 +21,9 @@ const messages = {
const i18n = createI18n({
locale: tool.data.get("APP_LANG") || sysConfig.LANG,
fallbackLocale: 'zh-cn',
globalInjection: true,
globalInjection: false,
messages,
legacy: false
})
export default i18n;

View File

@ -33,6 +33,7 @@ app.use(DataVVue3);
//挂载app
app.mount("#app");
app.config.globalProperties.$t = i18n.global.t
const debounce = (fn, delay) => {
let timer = null;

View File

@ -27,7 +27,7 @@
</el-header>
<el-main>
<scTable ref="table" :apiObj="apiObj" :params="params" size="large" style="" @row-click="rowClick"
:query="query" @dataChange="updateCount">
:query="query" @dataChange="updateCount" row-key="id">
<el-table-column type="index" width="50" />
<el-table-column prop="number" label="车牌号码/登记号码"></el-table-column>
<el-table-column prop="name" label="车辆识别代码(VIN)"></el-table-column>

View File

@ -27,7 +27,7 @@
</el-header>
<el-main>
<scTable ref="table" :apiObj="apiObj" :params="params" size="large" style="" @row-click="rowClick"
:query="query" @dataChange="updateCount">
:query="query" @dataChange="updateCount" row-key="id">
<el-table-column type="index" width="50" />
<el-table-column prop="number" label="车牌号码/登记号码"></el-table-column>
<el-table-column prop="name" label="车辆识别代码(VIN)"></el-table-column>

View File

@ -27,7 +27,7 @@
</el-header>
<el-main>
<scTable ref="table" :apiObj="apiObj" :params="params" size="large" style="" @row-click="rowClick"
:query="query" @dataChange="updateCount">
:query="query" @dataChange="updateCount" row-key="id">
<el-table-column type="index" width="50" />
<el-table-column prop="number" label="车牌号码/登记号码"></el-table-column>
<el-table-column prop="name" label="车辆识别代码(VIN)"></el-table-column>

View File

@ -37,7 +37,7 @@
</el-header>
<el-main class="nopadding">
<scTable v-if="activeName==10" ref="table" :data="data1" :params="params" :query="query" size="large" >
<scTable v-if="activeName==10" ref="table" :data="data1" :params="params" :query="query" size="large" row-key="id">
<el-table-column prop="index" label="序号"></el-table-column>
<el-table-column prop="cphm" label="车牌号码/登记号码"></el-table-column>
<el-table-column prop="clsbdm" label="车辆识别代码VIN"></el-table-column>
@ -55,7 +55,7 @@
</scTable>
<scTable v-else-if="activeName==20" ref="table" :data="data2" :params="params" :query="query" size="large" style=""
@row-click="rowClick" @dataChange="updateCount">
@row-click="rowClick" @dataChange="updateCount" row-key="id">
<el-table-column prop="index" label="序号"></el-table-column>
<el-table-column prop="cphm" label="车牌号码/登记号码"></el-table-column>
<el-table-column prop="clsbdm" label="车辆识别代码VIN"></el-table-column>
@ -73,7 +73,7 @@
</scTable>
<scTable v-else-if="activeName==30" ref="table" :data="data3" :params="params" :query="query" size="large" style=""
@row-click="rowClick" @dataChange="updateCount">
@row-click="rowClick" @dataChange="updateCount" row-key="id">
<el-table-column prop="index" label="序号"></el-table-column>
<el-table-column prop="hbdjbh" label="环保登记编号"></el-table-column>
<el-table-column prop="jxscrq" label="机械生产日期"></el-table-column>

View File

@ -12,7 +12,7 @@
</el-header>
<el-main>
<scTable :apiObj="apiObj" size="large" :params="params" :query="query" @row-click="rowClick">
<scTable :apiObj="apiObj" size="large" :params="params" :query="query" @row-click="rowClick" row-key="id">
<el-table-column type="index" width="50" />
<el-table-column prop="number" label="设备编号"></el-table-column>
<el-table-column prop="name" label="设备名称"></el-table-column>

View File

@ -41,7 +41,7 @@
</el-header>
<el-main>
<scTable ref="table" :data="tableData" :apiObj="apiObj" :params="params" :query="query" size="large"
style="" @row-click="rowClick">
style="" @row-click="rowClick" row-key="id">
<el-table-column type="index" width="50" />
<el-table-column prop="number" label="设备编号"></el-table-column>
<el-table-column prop="name" label="设备名称"></el-table-column>

View File

@ -35,7 +35,7 @@
</el-header>
<el-main>
<scTable ref="table" :apiObj="apiObj" :params="params" size="large" style="" @row-click="rowClick"
:query="query" @dataChange="updateCount">
:query="query" @dataChange="updateCount" row-key="id">
<el-table-column type="index" width="50" />
<el-table-column prop="number" label="排放口编号"></el-table-column>
<el-table-column prop="name" label="排放口名称"></el-table-column>

View File

@ -38,7 +38,7 @@
</el-header>
<el-main>
<scTable ref="table" :data="data" :params="params" :query="query" size="large" style=""
@row-click="rowClick" @dataChange="updateCount">
@row-click="rowClick" @dataChange="updateCount" row-key="id">
<el-table-column prop="index" label="序号"></el-table-column>
<el-table-column prop="bcrkbh" label="出入口编号"></el-table-column>
<el-table-column prop="dzbh" label="道闸编号"></el-table-column>

View File

@ -38,7 +38,7 @@
</el-header>
<el-main>
<scTable ref="table" :apiObj="apiObj" :params="params" :query="query" size="large" style=""
@row-click="rowClick" @dataChange="updateCount">
@row-click="rowClick" @dataChange="updateCount" row-key="id">
<el-table-column type="index" width="50" />
<el-table-column prop="vehicle_number" label="车牌号码"></el-table-column>
<el-table-column prop="access_time" label="过门禁时间"></el-table-column>

View File

@ -966,41 +966,30 @@ export default {
},
getMaterialList() {
let that = this;
this.$API.mtm.material.list
.req({ page: 0, type: 20, count__gte: 1 })
.then((res) => {
let data = [];
if (res.length > 0) {
res.forEach((item) => {
let arr = [];
let colorText = "";
if (
item.count_safe !== null &&
item.count_safe < item.count
) {
colorText =
'<span style="color:red;">' +
item.count +
"</span>";
} else {
colorText =
'<span style="color:green;">' +
item.count +
"</span>";
let obj = {
query: {
"select_dept": "",
"groupby_dept": "",
"material_types": "20",
"select_material": "material.name as material_name",
"groupby_material": "material.name",
"select_material_name": "",
"groupby_material_name": ""
}
arr[0] =
item.name +
"|" +
item.specification +
"|" +
item.model;
};
that.$API.bi.dataset.exec.req("materialCount", obj).then((res) => {
let data = [];
let list = res.data2.ds0;
if (list.length > 0) {
list.forEach((item) => {
let arr = [];
arr[0] = item.material_name ;
arr[1] = item.count;
data.push(arr);
});
}
that.taskBoard.data = data;
// console.log('getMaterialList', data)
});
})
},
showTime() {
this.currentTime = this.$TOOL.dateFormat(new Date(), "hh:mm:ss");

63
src/views/em/repair.vue Normal file
View File

@ -0,0 +1,63 @@
<template>
<el-container>
<el-header>
<div class="left-panel"></div>
<div class="right-panel">
<!-- <el-button type="primary" @click="handleAdd">新增</el-button> -->
<el-input
v-model="query.search"
placeholder="设备信息等"
clearable
@keyup.enter="$refs.table.refresh()"
></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="API.em.repair.list"
row-key="id"
stripe
:query="query"
@row-click="(row)=>{t_id=row.id;mode='show';drawerVisible=true;}"
>
<el-table-column label="设备" prop="equipment_fullname" width="300" show-overflow-tooltip></el-table-column>
<el-table-column label="流程状态" width="300" show-overflow-tooltip>
<template #default="scope">
<el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
{{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
</el-tag>
<el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>
</template>
</el-table-column>`
<el-table-column label="故障类别" prop="fault_cate" width="100" show-overflow-tooltip></el-table-column>`
<el-table-column label="故障描述" prop="fault_description" show-overflow-tooltip></el-table-column>
<el-table-column label="维修人" prop="repair_user_name" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="维修开始时间" prop="repair_start_time" width="200" show-overflow-tooltip></el-table-column>
</scTable>
</el-main>
</el-container>
<el-drawer title="维修申请" v-model="drawerVisible" :size="'80%'" destroy-on-close>
<repair-form :mode="mode" :t_id="t_id"></repair-form>
</el-drawer>
</template>
<script setup>
import { ref } from 'vue'
import API from '@/api'
import repairForm from './repair_form.vue'
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
const query = ref({});
const drawerVisible = ref(false);
const mode = ref('add');
const t_id = ref(null);
const handleAdd = () => {
mode.value = 'add';
drawerVisible.value = true;
}
</script>

View File

@ -0,0 +1,181 @@
<template>
<el-container>
<el-main class="nopadding">
<el-form label-width="110px" :model="formData" style="padding: 20px;">
<el-form-item label="创建时间" v-if="localMode !== 'add'">
{{ formData.create_time }}
</el-form-item>
<el-form-item label="设备选择" required>
<xtSelect
v-model="formData.equipment"
style="width: 100%;"
:apiObj = "$API.em.equipment.list"
v-model:label="formData.equipment_fullname"
:labelField="'full_name'"
:edit="localMode === 'add'"
>
<el-table-column prop="number" label="设备编号"></el-table-column>
<el-table-column prop="name" label="设备名称"></el-table-column>
<el-table-column prop="belong_dept_name" label="所属部门"></el-table-column>
</xtSelect>
</el-form-item>
<el-form-item label="报修事由" required>
<el-input
type="textarea"
:rows="3"
v-model="formData.fault_description"
placeholder="请输入报修事由"
:readonly="localMode === 'show'"
></el-input>
</el-form-item>
<el-form-item label="故障分类" required v-if="localMode != 'add'">
<el-select
v-model="ticket_data.fault_cate"
placeholder="请选择故障分类"
v-if="formData.ticket && formData.ticket_.state_.name == '条保负责人分派'"
>
<el-option label="机械" value="机械"></el-option>
<el-option label="电气" value="电气"></el-option>
</el-select>
<span v-else>{{ formData.fault_cate }}</span>
</el-form-item>
<el-form-item label="维修人" required v-if="localMode != 'add'">
<xtSelect :apiObj="$API.system.user.list"
v-if="formData.ticket && formData.ticket_.state_.name == '条保负责人分派'" v-model="ticket_data.repair_user">
<el-table-column prop="name" label="姓名"></el-table-column>
<el-table-column prop="belong_dept_name" label="部门"></el-table-column>
</xtSelect>
<span v-else>{{ formData.repair_user_name }}</span>
</el-form-item>
<el-form-item label="维修开始时间" required v-if="localMode != 'add'">
<el-date-picker
v-if="formData.ticket && formData.ticket_.state_.name == '维修人员处理'"
v-model="ticket_data.repair_start_time"
type="datetime"
placeholder="请选择维修开始时间"
value-format="YYYY-MM-DD HH:mm:ss"
></el-date-picker>
<span v-else>{{ formData.repair_start_time }}</span>
</el-form-item>
<el-form-item label="维修工时" required v-if="localMode != 'add'">
<el-input-number v-model="ticket_data.repair_duration" :min="0" :precision="1"
v-if="formData.ticket && formData.ticket_.state_.name == '维修人员处理'" ></el-input-number>
<span v-else>{{ formData.repair_duration }}</span>
</el-form-item>
<el-form-item label="维修描述" required v-if="localMode != 'add'">
<el-input
type="textarea"
:rows="3"
v-model="ticket_data.repair_description"
placeholder="请输入维修描述"
v-if="formData.ticket && formData.ticket_.state_.name == '维修人员处理'"
></el-input>
<span v-else>{{ formData.repair_description }}</span>
</el-form-item>
</el-form>
<el-footer>
<el-button type="danger"
v-if="localMode=='edit'"
style="margin-right: 4px;"
@click="handleDel"
:loading="saveLoading"
>删除</el-button>
<ticketd_b
v-if = "formData.ticket_"
:t_id="formData.id"
:ticket_="formData.ticket_"
:ticket_data="ticket_data"
@success="$emit('success', localMode)"
ref="ticketd_b"
></ticketd_b>
<el-button
v-else
type="primary"
style="margin-right: 4px;"
@click="handleSave"
:loading="saveLoading"
>提交审批</el-button>
</el-footer>
</el-main>
<el-aside width="20%" v-if="formData.ticket_">
<ticketd :ticket_="formData.ticket_" @success="$emit('success')"></ticketd>
</el-aside>
</el-container>
</template>
<script>
import ticketd_b from "@/views/wf/ticketd_b.vue";
import ticketd from '@/views/wf/ticketd.vue'
export default {
name: 'repair_form',
components: {
ticketd_b,
ticketd
},
props: {
mode: {
type: String,
default: 'show'
},
t_id: {
type: String,
default: ""
}
},
data() {
return {
formData: {
},
ticket_data: {},
localMode: this.mode,
saveLoading: false
}
},
mounted() {
if (this.t_id) {
this.getTid();
} else {
this.localMode = "add";
}
},
methods: {
async getTid() {
try {
let res = await this.$API.em.repair.item.req(this.t_id);
this.formData = res;
if (res.ticket_ && res.ticket_.state_.type == 1 && res.create_by == this.$TOOL.data.get("USER_INFO").id) {
this.localMode = "edit";
}
} catch (error) {
console.error('获取数据失败:', error);
}
},
handleDel() {
this.$confirm(`确定删除吗?`, "提示", {
type: "warning",
})
.then(()=>{
this.$API.em.repair.delete.req(this.formData.id).then(res=>{
this.$message.success("删除成功");
this.$emit('success');
})
})
},
async handleSave() {
if (this.localMode == "add") {
try {
let res = await this.$API.em.repair.create.req(this.formData);
this.$message.success("提交成功");
this.$emit('success', this.localMode);
} catch (error) {
console.error('提交失败:', error);
throw error;
}
} else if (this.localMode == "edit") {
this.$message.error("不支持编辑");
}
}
}
}
</script>

View File

@ -173,7 +173,7 @@
:type="type"
:cate="cate"
:mioId="mioId"
@closed="visibleDrawer = false"
@closed="closedFun"
>
</record-dialog>
</template>
@ -307,6 +307,10 @@ export default {
handleSaveSuccess() {
this.$refs.table.refresh();
},
closedFun(){
this.visibleDrawer = false;
this.$refs.table.refresh();
},
},
};
</script>

View File

@ -141,7 +141,13 @@
</div>
</template>
</el-table-column>
<el-table-column label="检验" prop="count_tested" v-if="cate=='mainso'">
<el-table-column label="检验" prop="count_tested" v-if="cate=='mainso'&&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')">
</el-table-column>
<el-table-column label="检验提交" prop="count_tested" v-if="cate=='mainso'&&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')">
<template #default="scope">
<el-tag v-if="scope.row.test_date == null" type="warning"></el-tag>
<el-tag v-else type="success"></el-tag>
</template>
</el-table-column>
<el-table-column label="不合格数量" prop="count_notok" v-if="cate!=='helpso'">
</el-table-column>
@ -158,8 +164,7 @@
link
type="primary"
@click="table_check(scope.row)"
v-if="project_code=='bxerp'&&mioObj.state == 10 &&
(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
v-if="project_code=='bxerp'&&mioObj.state == 10 &&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
v-auth="'mioitem.test'"
>检验</el-button>
<scFileImport
@ -672,9 +677,9 @@ export default {
if((index == 6||index == 7||index == 8||index == 9)&&column.label=='不合格数量'){
propert = 'count_notok';
}
if((index == 6||index == 7||index == 8)&&column.label=='检验'){
propert = 'count_tested';
}
// if((index == 6||index == 7||index == 8)&&column.label==''){
// propert = 'count_tested';
// }
if(index == 6 &&column.label == '发出数量'){
propert = 'count_send';
}

View File

@ -605,9 +605,17 @@
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item
:label="project_code === 'gx'? '总数': '总袋(桶)数'"
<el-form-item v-if="project_code === 'gx'" label="总数">
<el-input-number
v-model="form.count"
:min="0"
disabled="true"
style="width: 100%"
controls-position="right"
>
</el-input-number>
</el-form-item>
<el-form-item v-if="project_code === 'gz'" label="总袋(桶)数">
<el-input-number
v-model="form.count_bag"
:min="0"
@ -618,7 +626,14 @@
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="抽样数量">
<el-form-item label="不合格数量" v-if="project_code === 'gx'&&type == 'pur_in'">
<el-input
disabled
v-model="form.count_notok"
placeholder="不合格数量"
/>
</el-form-item>
<el-form-item label="抽样数量" v-else>
<!-- 光芯 -->
<el-input-number
v-if="project_code === 'gx'"
@ -666,7 +681,17 @@
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="检验合格" prop="is_testok">
<el-form-item label="崩边" v-if="project_code === 'gx'&&type == 'pur_in'">
<el-input-number
v-model="form.count_n_qt"
:min="0"
style="width: 100%"
controls-position="right"
@change="nqtChange"
>
</el-input-number>
</el-form-item>
<el-form-item label="检验合格" prop="is_testok" v-else>
<el-select
v-model="form.is_testok"
placeholder="检验合格"
@ -791,8 +816,8 @@
</el-form>
</el-header>
<el-main style="padding: 0 20px 20px 20px" id="mioitemwMain">
<scTable :tableHeight="tableHeight" :data="mioitemwList" border hideDo hidePagination>
<el-table-column label="物料编号" prop="number">
<scTable :tableHeight="tableHeight" :data="mioitemwList" row-key="id" border hideDo hidePagination>
<el-table-column label="物料编号" prop="number" min-width="170px" fixed="left">
</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">
@ -985,6 +1010,7 @@ export default {
console.log("objitem", that.objitem);
that.form.material_name = that.objitem.material_name;
that.form.batch = that.objitem.batch;
that.form.count = that.objitem.count;
that.form.count_bag = that.objitem.count_bag;
}
if (
@ -1070,6 +1096,9 @@ export default {
}
return this;
},
nqtChange(){
this.form.count_notok = this.form.count_n_qt;
},
getMaterialItem(){
let that = this;
that.$API.mtm.material.item.req(that.objitem.material).then(()=>{
@ -1325,13 +1354,15 @@ export default {
if (valid) {
that.isSaveing = true;
try {
if (that.type == "pur_in") {
if (that.type == "pur_in"&&that.project_code!="gx") {
console.log(that.form);
let arr = [];
if(that.weight_kgs.length>0){
that.weight_kgs.forEach((item) => {
arr.push(item.value);
});
that.form.weight_kgs = arr;
}
console.log('that.form',that.form);
that.$API.inm.mioitem.testpurin
.req(that.mioitemId, that.form)

View File

@ -119,7 +119,7 @@
prop="val_xj"
>
<template #default="scope">
<el-tag>{{state_xj[scope.row.val_xj]}}</el-tag>
<el-tag v-if="scope.row.val_xj!=null&&scope.row.val_xj!=''">{{state_xj[scope.row.val_xj]}}</el-tag>
</template>
</el-table-column>
<el-table-column

View File

@ -246,7 +246,7 @@ export default {
return {
loading: false,
form: {
val_xj: "S",
val_xj: "",
},
rules: {
belong_dept: [

View File

@ -53,7 +53,7 @@
<span v-if="scope.row.剪切合格">{{((scope.row.剪切合格/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
<el-table-column label="剪切加率">
<el-table-column label="剪切加率">
<template #default="scope">
<span v-if="scope.row['剪切¢18.3mm不合格']">{{ (((scope.row.总切片数-scope.row['剪切18.3mm不合格'].含)/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-else>100%</span>
@ -71,14 +71,15 @@
<span v-else>0%</span>
</template>
</el-table-column>
<el-table-column label="加率">
<el-table-column label="加率">
<template #default="scope">
<span v-if="scope.row.总切片合格数">{{((scope.row.总切片合格/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-if="scope.row.总切片完全合格数">{{((scope.row.加工率/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
<el-table-column label="合格率" prop="合格率">
<!-- 暗点合格并且剪切合格的板段数在暗点合格含里刨除剪切可加工和剪切不合格 -->
<template #default="scope">
<span v-if="scope.row.总切片完全合格数">{{((scope.row.总切片完全合格数/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-if="scope.row.总切片完全合格数">{{((scope.row.暗点合格.仅/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
</scTable>
@ -87,7 +88,6 @@
</template>
<script>
import { genTree } from "@/utils/verificate";
export default {
name: "workerTimes",
data() {
@ -104,7 +104,9 @@ export default {
mounted() {
let that = this;
let date = new Date();
that.query.start_date = that.query.end_date = that.$TOOL.dateFormat2(date);
that.query.end_date = that.$TOOL.dateFormat2(date);
that.query.start_date = that.query.end_date.split('-')[0] + '-' + that.query.end_date.split('-')[1] + '-01';
that.getData();
this.deptMgroup();
},
@ -129,6 +131,7 @@ export default {
}
item.不合格数 = 0;
item.可加工数 = 0;
item.加工率数 = item.总切片合格数?item.总切片合格数:0-item.暗点不合格.?item.暗点合格.:0;
if(item['剪切¢18.3mm不合格']){
if(item['剪切¢18.3mm可加工']){
item.剪切合格 = item.总切片数 - item['剪切¢18.3mm可加工'].- item['剪切¢18.3mm不合格'].;

View File

@ -51,11 +51,26 @@
<el-table-column v-for="item in lists" :key="item" :label="item.text" align="center">
<el-table-column v-for="item1 in item.value" :key="item1" :label="item1">
<template #default="scope">
<el-input v-if="scope.row.indexs==0&&scope.row" v-model="scope.row[item.text+'_'+item1]"></el-input>
<el-input v-if="scope.row.indexs==0&&scope.row" v-model="scope.row[item.text+'_'+item1]" @change="xishuChange"></el-input>
<span v-if="scope.row.indexs!==0&&scope.row">{{ scope.row[item.text+'_'+item1] }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="其它工时" prop="其它工时">
<template #default="scope">
<el-input v-if="scope.row.indexs!==0&&scope.row" v-model="scope.row.time_other" @change="xishuChange"></el-input>
</template>
</el-table-column>
<el-table-column label="总工时" prop="总工时">
<template #default="scope">
<el-input v-if="scope.row.indexs!==0&&scope.row" v-model="scope.row.time_all"></el-input>
</template>
</el-table-column>
<el-table-column label="备注" prop="备注">
<template #default="scope">
<el-input v-if="scope.row.indexs!==0&&scope.row" v-model="scope.row.note"></el-input>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
@ -87,16 +102,19 @@ export default {
methods: {
getData(){
let that = this;
that.lists = [];
that.mgruops = [];
that.tableData = [];
that.titleList = [];
that.coefficient = [];
let params = {};
params.query = that.query;
that.$API.bi.dataset.exec.req('lineDay_p', params).then((res) => {
let data = res.data2.ds0;
that.lists = [];
let coefficient = [];
if(data.length>0){
data.forEach(item=>{
let obj = JSON.parse(item.段物料生产数);
let obj = item.工序物料生产数?JSON.parse(item.序物料生产数):{};
for(let key in obj){
if(coefficient.indexOf(key)<0){
coefficient.push(key);
@ -116,15 +134,50 @@ export default {
item[pname]= obj[key];
}
})
that.coefficient = coefficient;
let item0 = {日期:'系数',操作人:'',indexs:0};
coefficient.forEach(cof=>{
item0[cof]= 1;
})
if(data.length>0){
data.unshift(item0);
data.forEach(item1 => {
item1.time_other=0;
let all = 0;
coefficient.forEach(item2 => {
if(item1[item2]){
all = all+ Number(item1[item2])
}
})
item1.time_all = all;
})
}
that.tableData = data;
});
},
xishuChange(){
let that = this;
that.tableData.forEach((item1,index1) => {
if(index1>0){
let all = 0;
that.coefficient.forEach(item2 => {
if(item1[item2]){
all = all+ Number(item1[item2])*Number(that.tableData[0][item2])
}
})
item1.time_all = all+Number(item1.time_other);
}
})
},
otherChange(index){
let that = this;
let all = 0;
console.log('index',index)
that.coefficient.forEach(item2 => {
if(that.tableData[index][item2]){
all = all+ Number(that.tableData[index][item2])*Number(that.tableData[0][item2])
}
that.tableData[index].time_all = all+Number(that.tableData[index].time_other);
})
},
deptChange(){
this.getData();

View File

@ -0,0 +1,139 @@
<template>
<el-container>
<el-header>
<div class="left-panel"></div>
<div class="right-panel">
<xtSelect
:apiObj="apiObj"
v-model="query.process_name"
:valueField="'name'"
:labelField="'name'"
:params = "params"
v-model:label="query.process_name"
style="width:150px; margin-right: 5px;"
>
<el-table-column label="工序" prop="name"></el-table-column>
</xtSelect>
<el-date-picker
v-model="query.start_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="开始时间"
style="width: 150px"
/>
<el-date-picker
v-model="query.end_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 150px"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:data="tableData"
id="exportDiv"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column label="员工" prop="员工" fixed="left">
</el-table-column>
<el-table-column label="暗点" prop="暗点不合格">
</el-table-column>
<el-table-column label="长点" prop="长点">
</el-table-column>
<el-table-column label="暗点合格率" prop="暗点合格率">
<!-- <template #default="scope">
{{ scope.row.暗点不合格/scope.row.总切片数 }}
</template> -->
</el-table-column>
<el-table-column label="长点率" prop="长点率">
</el-table-column>
<el-table-column label="总加工" prop="总生产数">
</el-table-column>
<el-table-column label="总切片数" prop="总切片数">
</el-table-column>
<el-table-column label="加功率" prop="加功率">
</el-table-column>
<el-table-column label="暗点系数" prop="暗点系数">
</el-table-column>
<el-table-column label="系数" prop="系数">
</el-table-column>
<el-table-column label="奖励金额" prop="奖励金额">
</el-table-column>
</scTable>
</el-main>
</el-container>
</template>
<script>
export default {
name: "workerTimesRY",
data() {
return {
query:{
end_date:'',
process_name:'',
start_date:'',
},
lists:[],
mgruops:[],
tableData:[],
params:{cate:'热压'},
apiObj: this.$API.mtm.process.list,
};
},
mounted() {
let that = this;
let date = new Date();
that.query.end_date = that.$TOOL.dateFormat2(date);
that.query.start_date = that.query.end_date.split('-')[0] + '-' + that.query.end_date.split('-')[1] + '-01';
that.getData();
},
methods: {
getData(){
let that = this;
that.mgruops = [];
that.tableData = [];
let params = {};
params.query = that.query;
that.$API.bi.dataset.exec.req('prodect_defect_reya', params).then((res) => {
let data = res.data2.ds0;
that.lists = [];
let coefficient = [];
data.forEach(item=>{
let obj = JSON.parse(item.缺陷分布);
console.log('obj',obj);
for(let key in obj){
item[key]= obj[key].;
}
if(item.暗点合格){
item.暗点合格率 = ((item.暗点合格/item.总切片数)*100).toFixed(2)+'%'
}
})
console.log('data',data)
that.tableData = data;
});
},
deptChange(){
this.getData();
},
handleQuery(){
let that = this;
that.getData();
},
},
};
</script>
<style scoped>
</style>

View File

@ -43,6 +43,21 @@
</el-table-column>
<el-table-column label="板号" prop="number" fixed="left">
</el-table-column>
<el-table-column label="炸" align="center" class-name="colorheader1">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_炸?scope.row.data.中检一_缺陷项_炸:0 }}</span>
</template>
</el-table-column>
<el-table-column label="偏" align="center" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_偏?scope.row.data.中检一_缺陷项_偏:0 }}</span>
</template>
</el-table-column>
<el-table-column label="掉头" align="center" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_掉头?scope.row.data.中检一_缺陷项_掉头:0 }}</span>
</template>
</el-table-column>
<el-table-column label="台阶划伤" align="center" class-name="colorheader1">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_台阶划伤?scope.row.data.中检一_缺陷项_台阶划伤:0 }}</span>
@ -63,64 +78,44 @@
<span>{{ scope.row.data.中检一_缺陷项_台糙?scope.row.data.中检一_缺陷项_台糙:0 }}</span>
</template>
</el-table-column>
<el-table-column label="外黑" align="center" class-name="colorheader5">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_外黑?scope.row.data.中检一_缺陷项_外黑:0 }}</span>
</template>
</el-table-column>
<el-table-column label="尺寸大/小" align="center" class-name="colorheader6">
<template #default="scope">
<span>{{ scope.row.data['中检一_缺陷项_尺寸大/小']?scope.row.data['中检一_缺陷项_尺寸大/小']:0 }}</span>
</template>
</el-table-column>
<el-table-column label="拆头" align="center" class-name="colorheader7">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_拆头?scope.row.data.中检一_缺陷项_拆头:0 }}</span>
</template>
</el-table-column>
<el-table-column label="外磕" align="center" class-name="colorheader1">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_外磕?scope.row.data.中检一_缺陷项_外磕:0 }}</span>
</template>
</el-table-column>
<el-table-column label="掉头" align="center" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_掉头?scope.row.data.中检一_缺陷项_掉头:0 }}</span>
</template>
</el-table-column>
<el-table-column label="打毛/打台" align="center" class-name="colorheader3">
<template #default="scope">
<span>{{ scope.row.data['中检一_缺陷项_打毛/打台']?scope.row.data['中检一_缺陷项_打毛/打台']:0 }}</span>
</template>
</el-table-column>
<el-table-column label="量崩" align="center" class-name="colorheader4">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_量崩?scope.row.data.中检一_缺陷项_量崩:0 }}</span>
</template>
</el-table-column>
<el-table-column label="崩" align="center" class-name="colorheader5">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_崩?scope.row.data.中检一_缺陷项_崩:0 }}</span>
</template>
</el-table-column>
<el-table-column label="喷码" align="center" class-name="colorheader6">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_喷码?scope.row.data.中检一_缺陷项_喷码:0 }}</span>
</template>
</el-table-column>
<el-table-column label="修崩/炸" align="center" class-name="colorheader7">
<template #default="scope">
<span>{{ scope.row.data['中检一_缺陷项_修崩/炸']?scope.row.data['中检一_缺陷项_修崩/炸']:0 }}</span>
</template>
</el-table-column>
<el-table-column label="" align="center" class-name="colorheader1">
<el-table-column label="拆头" align="center" class-name="colorheader7">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_?scope.row.data.中检一_缺陷项_:0 }}</span>
<span>{{ scope.row.data.中检一_缺陷项_拆头?scope.row.data.中检一_缺陷项_拆头:0 }}</span>
</template>
</el-table-column>
<el-table-column label="" align="center" class-name="colorheader2">
<el-table-column label="外黑" align="center" class-name="colorheader5">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_偏?scope.row.data.中检一_缺陷项_偏:0 }}</span>
<span>{{ scope.row.data.中检一_缺陷项_外黑?scope.row.data.中检一_缺陷项_外黑:0 }}</span>
</template>
</el-table-column>
<el-table-column label="外磕" align="center" class-name="colorheader1">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_外磕?scope.row.data.中检一_缺陷项_外磕:0 }}</span>
</template>
</el-table-column>
<el-table-column label="打毛/打台" align="center" class-name="colorheader3">
<template #default="scope">
<span>{{ scope.row.data['中检一_缺陷项_打毛/打台']?scope.row.data['中检一_缺陷项_打毛/打台']:0 }}</span>
</template>
</el-table-column>
<el-table-column label="喷码" align="center" class-name="colorheader6">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_喷码?scope.row.data.中检一_缺陷项_喷码:0 }}</span>
</template>
</el-table-column>
<el-table-column label="掉皮" align="center" class-name="colorheader3">
@ -128,6 +123,11 @@
<span>{{ scope.row.data.中检一_缺陷项_掉皮?scope.row.data.中检一_缺陷项_掉皮:0 }}</span>
</template>
</el-table-column>
<el-table-column label="量崩" align="center" class-name="colorheader4">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_量崩?scope.row.data.中检一_缺陷项_量崩:0 }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" class-name="colorheader4">
<template #default="scope">
<span>{{ scope.row.data.中检一_缺陷项_备注 }}</span>

View File

@ -509,7 +509,8 @@
</el-table-column>
<el-table-column label="仓库库存" class-name="colorheader6">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.库存_count }}</span>
<!-- <span v-if="scope.row.data">{{ scope.row.data.仓库_count }}</span> -->
<span v-if="scope.row.data">{{ scope.row.data.六车间生产入库_count?scope.row.data.六车间生产入库_count:0 - scope.row.data.销售发货_count?scope.row.data.销售发货_count:0 }}</span>
</template>
</el-table-column>
<el-table-column label="组合件批次号" class-name="colorheader7">
@ -519,17 +520,17 @@
</el-table-column>
<el-table-column label="发货数" class-name="colorheader1">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.销售发货_count }}</span>
<span v-if="scope.row.data">{{ scope.row.data.销售发货_count?scope.row.data.销售发货_count:0 }}</span>
</template>
</el-table-column>
<el-table-column label="6号领取加工-发货合格率" class-name="colorheader2">
<template #default="scope">
<span v-if="scope.row.data&&(scope.row.data.六车间_批次发货合格率||scope.row.data.六车间_批次发货合格率==0)">{{ scope.row.data.六车间_批次发货合格率 }}%</span>
<span v-if="scope.row.data&&(scope.row.data.六车间领料_count?scope.row.data.六车间领料_count:0+scope.row.data.六车间交接领料_count?scope.row.data.六车间交接领料_count:0)>0">{{ scope.row.data.六车间生产入库_count?scope.row.data.六车间生产入库_count:0/(scope.row.data.六车间领料_count?scope.row.data.六车间领料_count:0+scope.row.data.六车间交接领料_count?scope.row.data.六车间交接领料_count:0)}}</span>
</template>
</el-table-column>
<el-table-column label="7号生产-发货合格率" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data&&(scope.row.data.七车间_批次发货合格率||scope.row.data.七车间_批次发货合格率==0)">{{ scope.row.data.七车间_批次发货合格率 }}%</span>
<span v-if="scope.row.data&&scope.row.data.棒料成型_count_ok?scope.row.data.棒料成型_count_ok:0>0">{{ (scope.row.data.六车间生产入库_count?scope.row.data.六车间生产入库_count:0)/scope.row.data.棒料成型_count_ok?scope.row.data.棒料成型_count_ok:0}}</span>
</template>
</el-table-column>
</scTable>

View File

@ -252,7 +252,7 @@
</el-table-column>
</el-table-column>
<el-table-column label="6号车间" align="center" class-name="colorheader4">
<el-table-column label="库存领料" align="center" class-name="colorheader4">
<!-- <el-table-column label="库存领料" align="center" class-name="colorheader4">
<el-table-column label="领取时间" width="160px" class-name="colorheader4">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间领料_日期 }}</span>
@ -278,26 +278,71 @@
<span v-if="scope.row.data">{{ scope.row.data.六车间领料_备注 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="交接领料" align="center" class-name="colorheader4">
</el-table-column> -->
<el-table-column label="领料" align="center" class-name="colorheader4">
<el-table-column label="领取时间" width="160px" class-name="colorheader4">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间交接领料_日期 }}</span>
<span v-if="scope.row.data&&scope.row.data.六车间领料_日期 ">{{ scope.row.data.六车间领料_日期 }}</span>
<span v-if="scope.row.data&&scope.row.data.六车间领料_日期&&scope.row.data.六车间交接领料_日期">;</span>
<span v-if="scope.row.data&&scope.row.data.六车间交接领料_日期 ">{{ scope.row.data.六车间交接领料_日期 }}</span>
</template>
</el-table-column>
<el-table-column label="领取数" class-name="colorheader4">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间交接领料_count }}</span>
<span v-if="scope.row.data&&scope.row.data.六车间领料_count">{{ scope.row.data.六车间领料_count + scope.row.data.六车间交接领料_count?scope.row.data.六车间交接领料_count:0 }}</span>
<span v-else>{{ scope.row.data.六车间交接领料_count?scope.row.data.六车间交接领料_count:'' }}</span>
</template>
</el-table-column>
<el-table-column label="交送人" class-name="colorheader4">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间交接领料_送料人 }}</span>
<span v-if="scope.row.data">{{ scope.row.data.六车间领料_仓库执行人?scope.row.data.六车间领料_仓库执行人:'' }}{{ scope.row.data.六车间交接领料_送料人?scope.row.data.六车间交接领料_送料人:'' }}</span>
</template>
</el-table-column>
<el-table-column label="领取人" class-name="colorheader4">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间交接领料_接料人 }}</span>
<span v-if="scope.row.data">{{ scope.row.data.六车间领料_车间执行人?scope.row.data.六车间领料_车间执行人:'' }}{{ scope.row.data.六车间交接领料_接料人?scope.row.data.六车间交接领料_接料人:'' }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="工前检验" align="center" class-name="colorheader3">
<el-table-column label="加工数" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_工前检验_count_real }}</span>
</template>
</el-table-column>
<el-table-column label="合格率" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data&&(scope.row.data.六车间_工前检验_合格率||scope.row.data.六车间_工前检验_合格率==0)">{{ scope.row.data.六车间_工前检验_合格率 }}%</span>
</template>
</el-table-column>
<el-table-column label="不合格数" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_工前检验_count_notok }}</span>
</template>
</el-table-column>
<el-table-column label="断裂" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_工前检验_count_n_dl }}</span>
</template>
</el-table-column>
<el-table-column label="其他" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{getCountQt(scope.row.data,'工前检验')}}</span>
</template>
</el-table-column>
<el-table-column label="加工日期" min-width="160" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_工前检验_日期 }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_工前检验_操作人 }}</span>
</template>
</el-table-column>
<el-table-column label="备注" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间_工前检验_备注 }}</span>
</template>
</el-table-column>
</el-table-column>
@ -501,9 +546,14 @@
</template>
</el-table-column>
</el-table-column>
<el-table-column label="仓库库存" class-name="colorheader7">
<template #default="scope">
<span v-if="scope.row.data">{{ scope.row.data.六车间生产入库_count?scope.row.data.六车间生产入库_count:0 - scope.row.data.销售发货_count?scope.row.data.销售发货_count:0 }}</span>
</template>
</el-table-column>
<el-table-column label="领管-终检合格率">
<template #default="scope">
<span v-if="scope.row.data&&(scope.row.data.七车间_批次发货合格率||scope.row.data.七车间_批次发货合格率==0)">{{ scope.row.data.七车间_批次发货合格率 }}%</span>
<span v-if="scope.row.data&&(scope.row.data.七车间_批次发货合格率||scope.row.data.七车间_批次发货合格率==0)">{{ (((scope.row.data.销售发货_count+scope.row.data.六车间库存_count)/(scope.row.data.六车间领料_count+scope.row.data.六车间交接领料_count))*100).toFixed(2) }}%</span>
</template>
</el-table-column>
<el-table-column label="组合件批次号" min-width="160">
@ -671,6 +721,14 @@ export default {
count_qt = data.管料退火_count_notok - count;
return count_qt;
}
}else if(type=='工前检验'){
if(data.六车间_工前检验_count_notok){
if (data.六车间_工前检验_count_n_dl !== undefined) {
count += data.六车间_工前检验_count_n_dl ;
}
count_qt = data.六车间_工前检验_count_notok - count;
return count_qt;
}
}else if(type=='开槽'){
if(data.六车间_开槽_count_notok){
if (data.六车间_开槽_count_n_dl !== undefined) {

View File

@ -14,13 +14,6 @@
:value="item.id">
</el-option>
</el-select>
<xtSelect :apiObj="apiObj" v-model="query.material" v-model:obj="selectObj"
:labelField="'name'" style="width: 250px;" :params="mquery"
@change="selectMaterialChange">
<el-table-column label="名称" prop="name"></el-table-column>
<el-table-column label="型号" prop="model"></el-table-column>
<el-table-column label="规格" prop="spcification"></el-table-column>
</xtSelect>
<el-button type="primary" icon="el-icon-search" @click="materialTypeChange"></el-button>
<el-button @click="handleExport('1')" type="primary">导出</el-button>
</div>
@ -74,6 +67,13 @@
<span style="font-size: 14px">库存出入库统计</span>
</div>
<div class="right-panel">
<xtSelect :apiObj="apiObj" v-model="query.material" v-model:obj="selectObj"
:labelField="'name'" style="width: 150px;" :params="mquery"
@change="selectMaterialChange">
<el-table-column label="名称" prop="name"></el-table-column>
<el-table-column label="型号" prop="model"></el-table-column>
<el-table-column label="规格" prop="spcification"></el-table-column>
</xtSelect>
<el-select v-model="query.mio_type" clearable @change="mioTypeChange" style="width: 100px">
<el-option v-for="e in mioTypeEnum.values" :key="e.key" :value="e.key"
:label="e.text"></el-option>

View File

@ -86,9 +86,11 @@
controls-position="right"
:min="0"
:step="1"
:max="count_cando"
:step-strictly="true"
style="width: 100%"
placeholder="请输入领用数量"
@change="countUseChange"
>
</el-input-number>
</el-form-item>
@ -100,6 +102,7 @@
controls-position="right"
:min="0"
:step="1"
:max="form.count_use"
:step-strictly="true"
style="width: 100%"
placeholder="请输入加工数量"
@ -114,6 +117,7 @@
controls-position="right"
:min="0"
:step="1"
disabled="true"
:step-strictly="true"
style="width: 100%"
placeholder="请输入合格数"
@ -586,6 +590,7 @@ export default {
handle_user: "",
},
count_cando:0,
mlogb: [],
userList: [],
batchOptions: [],
@ -663,9 +668,31 @@ export default {
},
batchChange(){
let that = this;
that.form.count_use = that.selectBatch.count_cando;
that.form.count_real = that.selectBatch.count_cando;
that.form.count_ok = that.selectBatch.count_cando;
this.form.count_notok =
this.form.count_n_hs =
this.form.count_n_cs =
this.form.count_n_zz =
this.form.count_n_tw =
this.form.count_n_zdd =
this.form.count_n_d =
this.form.count_n_dl =
this.form.count_n_qp =
this.form.count_n_bl =
this.form.count_n_hw =
this.form.count_n_yp =
this.form.count_n_bp =
this.form.count_n_sc =
this.form.count_n_zjd =
this.form.count_n_zjx =
this.form.count_n_qx =
this.form.count_n_js =
this.form.count_n_tydd =
this.form.count_n_sw =
this.form.count_n_bhpcd =
this.form.count_n_wq =
this.form.count_n_qt =
this.form.count_n_zw = 0;
that.count_cando = that.form.count_use = that.form.count_real = that.form.count_ok = that.selectBatch.count_cando;
},
//
getBatchs() {
@ -699,6 +726,12 @@ export default {
this.visible = true;
return this;
},
countUseChange(){
if(this.form.count_real>this.form.count_use){
this.form.count_real = this.form.count_use;
this.count_ok = this.form.count_real - this.form.count_notok;
}
},
countNotOkSun() {
this.form.count_notok =
Number(this.form.count_n_hs) +
@ -724,7 +757,7 @@ export default {
Number(this.form.count_n_wq) +
Number(this.form.count_n_qt) +
Number(this.form.count_n_zw);
this.form.count_real = this.form.count_use-this.form.count_notok;
this.form.count_ok = this.form.count_real-this.form.count_notok;
},
//
submit() {

View File

@ -117,6 +117,7 @@
</template>
<!-- 批次物料列表 wprList -->
<template v-if="route_code=='shangpaipingmo'">
<el-checkbox v-model="checkedStatus[bwIndex]" label="全选" @change="checkAllChange(bwIndex)" style="display: block;margin-top: -15px;"/>
<span v-for="item2 in form.handoverb[bwIndex].handoverbw" :key="item2" style="margin-right: 10px;">
<el-checkbox v-model="item2.checked" :label="item2.number" @change="handleChange(bwIndex)"/>
</span>
@ -197,12 +198,12 @@
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="mtype==30||type==50">
<el-col :md="12" :sm="24" v-if="(mtype==30||type==50)&&new_wm==''">
<el-form-item label="更改批次">
<el-switch v-model="change_batch" :disabled="type==50"></el-switch>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="type==50">
<el-col :md="12" :sm="24" v-if="type==50&&new_wm==''">
<el-form-item label="更改物料">
<xtSelect
:apiObj="apiObj"
@ -222,7 +223,7 @@
<el-input v-model="form.note" placeholder="处理备注"></el-input>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="change_batch">
<el-col :md="12" :sm="24" v-if="change_batch&&new_wm==''">
<el-form-item label="新批次号" prop="new_batch">
<el-input v-model="form.new_batch" placeholder="新批次号" @change="new_batch(form.new_batch)" :disabled="type==50&&isFeiPinku"></el-input>
<span style="color: red;">请手动录入新批次号不要用已有批次</span>
@ -265,6 +266,10 @@ export default {
type: Object,
default: () => ({}),
},
new_wm:{
type: String,
default: "",
},
},
components: {
scanDialog
@ -364,6 +369,7 @@ export default {
totalCount: 0,
deptID:'',
bwIndex:0,
checkedStatus:[],
userList: [],
userList2: [],
deptOptions:[],
@ -383,7 +389,7 @@ export default {
let that = this;
that.form.type = that.type;
if(that.type==50){
that.form.mtype=30;
that.mtype=30;
that.change_batch = true;
}
let arr = that.$route.path.split("/");
@ -392,6 +398,10 @@ export default {
that.materialObj = materialObj;
that.form.handle_date =that.form.send_date =this.$TOOL.dateFormat2(new Date());
that.form.send_mgroup = that.mgroupId;
if(that.new_wm!==''){
that.mtype==30;
that.form.new_wm = that.new_wm;
}
if(that.wmItem.wm){
that.form.new_batch = that.wmItem.batch;
that.form.material_changed = that.wmItem.material;
@ -427,6 +437,7 @@ export default {
methods: {
deletebw(index){
let that = this;
that.checkedStatus.splice(index,1);
this.form.handoverb[this.bwIndex].handoverbw.splice(index,1);
this.form.handoverb[this.bwIndex].count--;
let totalCount = 0;
@ -612,7 +623,11 @@ export default {
open(mode = "add",data,mtype) {
let that = this;
that.mode = mode;
if(mtype!==undefined&&mtype!==null){
that.mtype = mtype;
}
that.checkedStatus=[];
that.selectItems=[];
if(mtype==30){
that.change_batch = true;
}
@ -621,12 +636,12 @@ export default {
that.totalCount = 0;
data.forEach((item,index)=>{
item.wm = item.id;
that.checkedStatus.push(true)
that.selectItems.push(item.id)
that.totalCount += Number(item.count);
that.getWprList(item.wm,index);
})
console.log('that.isFeiPinku',that.isFeiPinku);
if(that.isFeiPinku){
console.log('data[0].material',data[0].material);
that.form.new_batch = data[0].batch;
that.form.material_changed = data[0].material;
that.form.material_changed_fname = data[0].material_name;
@ -699,9 +714,19 @@ export default {
that.form.handoverb[index].handoverbw = handoverbw;
})
},
checkAllChange(index){
this.form.handoverb[index].handoverbw.forEach(item=>{
item.checked = this.checkedStatus[index]
})
},
handleChange(index){
let trueCount = this.form.handoverb[index].handoverbw.filter(item => item.checked === true).length;
this.form.handoverb[index].count = trueCount;
if(trueCount==this.form.handoverb[index].handoverbw.length){
this.checkedStatus[index] = true;
}else{
this.checkedStatus[index] = false;
}
this.countChange();
},
countChange(){
@ -961,6 +986,7 @@ export default {
that.form.handoverb[indexs].handoverbw.push(obj1);
}
}else{//handoverb
if(that.new_wm==''){
that.materialOptions.forEach((item) => {
if(item.id == res[0].wm){
if(that.type==50){
@ -986,6 +1012,20 @@ export default {
that.form.handoverb.push(obj2);
}
})
}else{
console.log('res[0]',res[0])
let obj2 = {};
obj2.wm = res[0].wm;
obj2.batch = res[0].wm_batch;
obj2.process = res[0].process_name;
obj2.handoverbw = [];
obj2.count = 1;
let obj3 = {};
obj3.wpr = res[0].id;
obj3.number = res[0].number;
obj2.handoverbw.push(obj3);
that.form.handoverb.push(obj2);
}
}
}else{
that.$message.error("该批次不存在")

View File

@ -59,6 +59,9 @@
<span>{{ item2.number }}</span>
<el-icon class="circleCloseFilled" @click="deleteWpr($index,index2,item2.wpr)"><el-icon-circleClose-filled /></el-icon>
</div>
<div v-for="item3 in diff" :key="item3" class="wprItem disabledItem">
<span>{{ item3 }}</span>
</div>
</el-col>
</el-row>
<el-row>
@ -229,8 +232,11 @@ export default {
})
//arrswpr,
let diff = arrs.filter(item => !barchArrs.includes(item));
that.diff = diff;
console.log('diff',diff)
if(diff.length>0){
that.$confirm("物料"+diff.join(",")+"不在该批次中", "提示", {type: "warning",}).then(() => {});
that.$message.warning("物料"+diff.join(",")+"不在该批次中");
// that.$confirm(""+diff.join(",")+"", "", {type: "warning",}).then(() => {});
}
}else{
//handoverbdisabled
@ -251,7 +257,8 @@ export default {
}
})
}
this.$refs.codeInput.focus();
console.log('this.$refs.codeInput',this.$refs.codeInput)
this.$refs.codeInput[index].focus();
},
deleteWpr(index1,index2,wpr){
let that = this;
@ -356,6 +363,10 @@ export default {
margin-right: 20px;
margin-top: 5px;
}
.disabledItem{
color: #fff;
background: #f56c6c;
}
.circleCloseFilled{
position: absolute;
top: -7px;

View File

@ -245,6 +245,7 @@
ref="scrapDialog"
:type="type"
:tag="tag"
:new_wm="new_wm"
:wmItem="wmItem"
:mgroupName="mgroup_name"
:mgroupId="mgroupId"
@ -496,6 +497,7 @@ export default {
if(this.selection.length>0){
this.selection.forEach(item=>{
let obj = {};
obj.id = item.id;
obj.wm = item.id;
obj.batch = item.batch;
obj.process = item.material_.process_name;
@ -701,6 +703,7 @@ export default {
handleAddWpr(row){
this.dialog.scrap = true;
this.type = 50;
this.new_wm = row.id;
let obj = {};
obj.wm = row.id;
obj.batch = row.batch;
@ -710,7 +713,7 @@ export default {
obj.material_name = row.material_name;
this.wmItem = obj;
this.$nextTick(() => {
this.$refs.scrapDialog.open("add");
this.$refs.scrapDialog.open("add",'',30);
});
},
handleWprSuccess(row){},

View File

@ -164,9 +164,6 @@
type="primary"
style="margin-left: 10px;"
>检验</el-link>
<!-- <el-link :underline="false" type="primary"
@click="handleWatch(scope.row)"
>流程图</el-link> -->
</template>
</el-table-column>
</scTable>
@ -234,7 +231,6 @@
>
<template #default="scope">
<el-link :underline="false" @click="printMaterial(scope.row,'wpr')" type="primary">物料标签</el-link>
<el-link :underline="false" type="primary" @click="handleAddWpr(scope.row)">添加物料</el-link>
</template>
</el-table-column>
</scTable>
@ -519,6 +515,7 @@ export default {
if(this.selection.length>0){
this.selection.forEach(item=>{
let obj = {};
obj.id = item.id;
obj.wm = item.id;
obj.batch = item.batch;
obj.process = item.material_.process_name;

View File

@ -535,8 +535,10 @@ export default {
this.form.handoverb = [];
data.forEach(item=>{
let obj = {};
obj.wm = item.id;
obj.wm = item.wm;
obj.label = item.label;
obj.batch = item.batch;
obj.count_cando = item.count_canhandover;
obj.count = item.count_canhandover;
this.form.handoverb.push(obj);
this.totalCount += Number(item.count_canhandover);