Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
db2c5dc149
|
|
@ -27,6 +27,13 @@ export default {
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
update: {
|
||||||
|
req: async function(id, data){
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/asm/assetcate/${id}/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
delete: {
|
delete: {
|
||||||
name: "删除",
|
name: "删除",
|
||||||
req: async function(id){
|
req: async function(id){
|
||||||
|
|
@ -77,6 +84,13 @@ export default {
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
update: {
|
||||||
|
req: async function(id, data){
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/asm/assetlog/${id}/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
delete: {
|
delete: {
|
||||||
name: "删除",
|
name: "删除",
|
||||||
req: async function(id){
|
req: async function(id){
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ const props = defineProps({
|
||||||
options: { type: Array, default: null },
|
options: { type: Array, default: null },
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(["update:modelValue", "update:obj", "change"]);
|
const emit = defineEmits(["update:modelValue", "update:obj", "change", "update::label"]);
|
||||||
const selectable = (row) => row.count_canhandover?row.count_canhandover>0:true;
|
const selectable = (row) => row.count_canhandover?row.count_canhandover>0:true;
|
||||||
// 控制 popover 显示与隐藏的状态
|
// 控制 popover 显示与隐藏的状态
|
||||||
const showPopover = ref(false);
|
const showPopover = ref(false);
|
||||||
|
|
@ -170,6 +170,7 @@ const selectValue = computed({
|
||||||
},
|
},
|
||||||
set(val) {
|
set(val) {
|
||||||
emit("update:modelValue", val);
|
emit("update:modelValue", val);
|
||||||
|
emit("update:label", selectLabel.value);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,19 @@
|
||||||
<el-form-item label="保管部门" required>
|
<el-form-item label="保管部门" required>
|
||||||
<xtSelect
|
<xtSelect
|
||||||
v-model="formData.keep_dept"
|
v-model="formData.keep_dept"
|
||||||
style="width: 100%;"
|
|
||||||
:apiObj = "$API.system.dept.list"
|
:apiObj = "$API.system.dept.list"
|
||||||
v-model:label="formData.keep_dept_name"
|
v-model:label="formData.keep_dept_name"
|
||||||
:edit="localMode === 'add'"
|
:edit="localMode == 'add'"
|
||||||
|
>
|
||||||
|
<el-table-column prop="name" label="部门名称"></el-table-column>
|
||||||
|
</xtSelect>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保管人" required>
|
||||||
|
<xtSelect
|
||||||
|
v-model="formData.keeper"
|
||||||
|
:apiObj = "$API.system.user.list"
|
||||||
|
:edit="localMode != 'show'"
|
||||||
|
v-model:label="formData.keeper_name"
|
||||||
>
|
>
|
||||||
<el-table-column prop="name" label="部门名称"></el-table-column>
|
<el-table-column prop="name" label="部门名称"></el-table-column>
|
||||||
</xtSelect>
|
</xtSelect>
|
||||||
|
|
@ -31,41 +40,71 @@
|
||||||
:addTemplate="addTemplate"
|
:addTemplate="addTemplate"
|
||||||
placeholder="暂无数据"
|
placeholder="暂无数据"
|
||||||
>
|
>
|
||||||
<el-table-column prop="name" label="资产类别" width="180">
|
<el-table-column prop="name" width="160">
|
||||||
|
<template #header>
|
||||||
|
<span style="color: red">*</span>
|
||||||
|
<span>资产类别</span>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<xtSelect :apiObj="$API.asm.assetcate.list" v-model="scope.row.cate">
|
<xtSelect :apiObj="$API.asm.assetcate.list" v-model="scope.row.cate" v-model:label="scope.row.cate_name">
|
||||||
<el-table-column prop="name"></el-table-column>
|
<el-table-column prop="name"></el-table-column>
|
||||||
</xtSelect>
|
</xtSelect>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="资产名称" width="180">
|
<el-table-column prop="name" label="资产名称" width="160">
|
||||||
|
<template #header>
|
||||||
|
<span style="color: red">*</span>
|
||||||
|
<span>资产名称</span>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.name"></el-input>
|
<el-input v-model="scope.row.name"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="specification" label="规格型号" width="180">
|
<el-table-column prop="specification" label="规格型号" width="160">
|
||||||
|
<template #header>
|
||||||
|
<span style="color: red">*</span>
|
||||||
|
<span>规格型号</span>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.specification"></el-input>
|
<el-input v-model="scope.row.specification"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="quantity" label="数量" width="180">
|
<el-table-column prop="quantity" label="数量" width="180">
|
||||||
|
<template #header>
|
||||||
|
<span style="color: red">*</span>
|
||||||
|
<span>数量</span>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input-number v-model="scope.row.quantity" :min="1" :precision="0" controls-position="right"></el-input-number>
|
<el-input-number v-model="scope.row.quantity" :min="1" :precision="0" controls-position="right"></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="canuse_year" label="可用年限" width="180">
|
<el-table-column prop="canuse_year" label="可用年限" width="180">
|
||||||
|
<template #header>
|
||||||
|
<span style="color: red">*</span>
|
||||||
|
<span>可用年限</span>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input-number v-model="scope.row.canuse_year" :min="1" :precision="0" controls-position="right"></el-input-number>
|
<el-input-number v-model="scope.row.canuse_year" :min="1" :precision="0" controls-position="right"></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="original_value" label="资产原值" width="180">
|
<el-table-column prop="original_value" label="资产原值" width="180">
|
||||||
|
<template #header>
|
||||||
|
<span style="color: red">*</span>
|
||||||
|
<span>资产原值</span>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input-number v-model="scope.row.original_value" :min="1" :precision="2" controls-position="right"></el-input-number>
|
<el-input-number v-model="scope.row.original_value" :min="1" :precision="2" controls-position="right"></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="supplier" label="供应商" width="180">
|
<el-table-column prop="supplier" label="供应商" width="160">
|
||||||
|
<template #header>
|
||||||
|
<span style="color: red">*</span>
|
||||||
|
<span>供应商</span>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.supplier"></el-input>
|
<xtSelect :apiObj="$API.pum.supplier.list" v-model="scope.row.supplier" v-model:label="scope.row.supplier_name">
|
||||||
|
<el-table-column prop="name"></el-table-column>
|
||||||
|
</xtSelect>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="location" label="存放地点">
|
<el-table-column prop="location" label="存放地点">
|
||||||
|
|
@ -83,21 +122,21 @@
|
||||||
@click="handleDel"
|
@click="handleDel"
|
||||||
:loading="saveLoading"
|
:loading="saveLoading"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="localMode!='show'"
|
||||||
|
type="primary"
|
||||||
|
style="margin-right: 4px;"
|
||||||
|
@click="handleSave"
|
||||||
|
:loading="saveLoading"
|
||||||
|
>提交审批</el-button>
|
||||||
<ticketd_b
|
<ticketd_b
|
||||||
v-if = "formData.ticket_"
|
v-if = "formData.ticket_ && localMode=='show'"
|
||||||
:t_id="formData.id"
|
:t_id="formData.id"
|
||||||
:ticket_="formData.ticket_"
|
:ticket_="formData.ticket_"
|
||||||
:ticket_data="ticket_data"
|
:ticket_data="ticket_data"
|
||||||
@success="$emit('success', localMode)"
|
@success="$emit('success', localMode)"
|
||||||
ref="ticketd_b"
|
ref="ticketd_b"
|
||||||
></ticketd_b>
|
></ticketd_b>
|
||||||
<el-button
|
|
||||||
v-else
|
|
||||||
type="primary"
|
|
||||||
style="margin-right: 4px;"
|
|
||||||
@click="handleSave"
|
|
||||||
:loading="saveLoading"
|
|
||||||
>提交审批</el-button>
|
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-aside width="20%" v-if="formData.ticket_">
|
<el-aside width="20%" v-if="formData.ticket_">
|
||||||
|
|
@ -136,7 +175,8 @@ export default {
|
||||||
localMode: this.mode,
|
localMode: this.mode,
|
||||||
saveLoading: false,
|
saveLoading: false,
|
||||||
addTemplate: {
|
addTemplate: {
|
||||||
name: null,
|
quantity: 1,
|
||||||
|
canuse_year: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -150,7 +190,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
async getTid() {
|
async getTid() {
|
||||||
try {
|
try {
|
||||||
let res = await this.$API.em.repair.item.req(this.t_id);
|
let res = await this.$API.asm.assetlog.item.req(this.t_id);
|
||||||
this.formData = res;
|
this.formData = res;
|
||||||
if (res.ticket_ && res.ticket_.state_.type == 1 && res.create_by == this.$TOOL.data.get("USER_INFO").id) {
|
if (res.ticket_ && res.ticket_.state_.type == 1 && res.create_by == this.$TOOL.data.get("USER_INFO").id) {
|
||||||
this.localMode = "edit";
|
this.localMode = "edit";
|
||||||
|
|
@ -164,7 +204,7 @@ export default {
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(()=>{
|
.then(()=>{
|
||||||
this.$API.em.repair.delete.req(this.formData.id).then(res=>{
|
this.$API.asm.assetlog.delete.req(this.formData.id).then(res=>{
|
||||||
this.$message.success("删除成功");
|
this.$message.success("删除成功");
|
||||||
this.$emit('success');
|
this.$emit('success');
|
||||||
})
|
})
|
||||||
|
|
@ -173,7 +213,7 @@ export default {
|
||||||
async handleSave() {
|
async handleSave() {
|
||||||
if (this.localMode == "add") {
|
if (this.localMode == "add") {
|
||||||
try {
|
try {
|
||||||
let res = await this.$API.em.repair.create.req(this.formData);
|
let res = await this.$API.asm.assetlog.create.req(this.formData);
|
||||||
this.$message.success("提交成功");
|
this.$message.success("提交成功");
|
||||||
this.$emit('success', this.localMode);
|
this.$emit('success', this.localMode);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
@ -181,7 +221,15 @@ export default {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
} else if (this.localMode == "edit") {
|
} else if (this.localMode == "edit") {
|
||||||
this.$message.error("不支持编辑");
|
try{
|
||||||
|
let res = await this.$API.asm.assetlog.update.req(this.formData.id, this.formData);
|
||||||
|
this.$message.success("提交成功");
|
||||||
|
this.$emit('success', this.localMode);
|
||||||
|
}catch (error){
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,21 +80,21 @@
|
||||||
@click="handleDel"
|
@click="handleDel"
|
||||||
:loading="saveLoading"
|
:loading="saveLoading"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
<ticketd_b
|
<el-button
|
||||||
v-if = "formData.ticket_"
|
v-if="localMode!='show'"
|
||||||
:t_id="formData.id"
|
type="primary"
|
||||||
:ticket_="formData.ticket_"
|
style="margin-right: 4px;"
|
||||||
:ticket_data="ticket_data"
|
@click="handleSave"
|
||||||
@success="$emit('success', localMode)"
|
:loading="saveLoading"
|
||||||
ref="ticketd_b"
|
>提交审批</el-button>
|
||||||
></ticketd_b>
|
<ticketd_b
|
||||||
<el-button
|
v-if = "formData.ticket_ && localMode=='show'"
|
||||||
v-else
|
:t_id="formData.id"
|
||||||
type="primary"
|
:ticket_="formData.ticket_"
|
||||||
style="margin-right: 4px;"
|
:ticket_data="ticket_data"
|
||||||
@click="handleSave"
|
@success="$emit('success', localMode)"
|
||||||
:loading="saveLoading"
|
ref="ticketd_b"
|
||||||
>提交审批</el-button>
|
></ticketd_b>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-aside width="20%" v-if="formData.ticket_">
|
<el-aside width="20%" v-if="formData.ticket_">
|
||||||
|
|
|
||||||
|
|
@ -42,20 +42,21 @@
|
||||||
@click="handleDel"
|
@click="handleDel"
|
||||||
:loading="saveLoading"
|
:loading="saveLoading"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
<ticketd_b
|
<el-button
|
||||||
v-if = "formData.ticket_"
|
v-if="localMode!='show'"
|
||||||
:t_id="formData.id"
|
type="primary"
|
||||||
:ticket_="formData.ticket_"
|
style="margin-right: 4px;"
|
||||||
@success="$emit('success', localMode)"
|
@click="handleSave"
|
||||||
ref="ticketd_b"
|
:loading="saveLoading"
|
||||||
></ticketd_b>
|
>提交审批</el-button>
|
||||||
<el-button
|
<ticketd_b
|
||||||
v-else
|
v-if = "formData.ticket_ && localMode=='show'"
|
||||||
type="primary"
|
:t_id="formData.id"
|
||||||
style="margin-right: 4px;"
|
:ticket_="formData.ticket_"
|
||||||
@click="handleSave"
|
:ticket_data="ticket_data"
|
||||||
:loading="saveLoading"
|
@success="$emit('success', localMode)"
|
||||||
>提交审批</el-button>
|
ref="ticketd_b"
|
||||||
|
></ticketd_b>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-aside width="20%" v-if="formData.ticket_">
|
<el-aside width="20%" v-if="formData.ticket_">
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@
|
||||||
v-auth="'mio.submit'"
|
v-auth="'mio.submit'"
|
||||||
v-if="scope.row.state == 10"
|
v-if="scope.row.state == 10"
|
||||||
>
|
>
|
||||||
<span v-if="scope.row.type =='do_in'">接收</span>
|
<span v-if="scope.row.type =='do_in'&&project_code=='gx'">接收</span>
|
||||||
<span v-else>提交</span>
|
<span v-else>提交</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -207,9 +207,15 @@ export default {
|
||||||
type: "",
|
type: "",
|
||||||
cate: "good",
|
cate: "good",
|
||||||
mioId: "",
|
mioId: "",
|
||||||
|
project_code: "",
|
||||||
visibleDrawer: false,
|
visibleDrawer: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
let config_base = that.$TOOL.data.get("BASE_INFO").base;
|
||||||
|
that.project_code = config_base.base_code;
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//添加
|
//添加
|
||||||
add(type) {
|
add(type) {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料单价">
|
<el-form-item label="物料单价" v-if="form.type != 'do_in'||form.type != 'do_out'">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.unit_price"
|
v-model="form.unit_price"
|
||||||
:min="0"
|
:min="0"
|
||||||
|
|
@ -534,7 +534,9 @@ export default {
|
||||||
if(that.form.batch == item.batch){
|
if(that.form.batch == item.batch){
|
||||||
that.form.count = item.count;
|
that.form.count = item.count;
|
||||||
that.form.wm = item.id;
|
that.form.wm = item.id;
|
||||||
that.batchcount = item.count;
|
if(!that.assembShow){
|
||||||
|
that.batchcount = item.count;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
@ -558,7 +560,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.getBatchOptions();
|
this.getBatchOptions();
|
||||||
}
|
}
|
||||||
if(that.type == 'pur_in'){
|
if(that.form.type == 'pur_in'||that.form.type == 'other_in'||that.assembShow){
|
||||||
that.batchcount = 99999999999;
|
that.batchcount = 99999999999;
|
||||||
if(that.project_code=='gx'){
|
if(that.project_code=='gx'){
|
||||||
that.form.batch = '无'
|
that.form.batch = '无'
|
||||||
|
|
|
||||||
|
|
@ -51,20 +51,21 @@
|
||||||
style="margin-right: 4px;"
|
style="margin-right: 4px;"
|
||||||
@click="handleDel"
|
@click="handleDel"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
<ticketd_b
|
<el-button
|
||||||
v-if ="formData.ticket_"
|
v-if="localMode!='show'"
|
||||||
:t_id="formData.id"
|
type="primary"
|
||||||
:ticket_="formData.ticket_"
|
style="margin-right: 4px;"
|
||||||
@success="$emit('success', localMode)"
|
@click="handleSave"
|
||||||
ref="ticketd_b"
|
:loading="saveLoading"
|
||||||
></ticketd_b>
|
>提交审批</el-button>
|
||||||
<el-button
|
<ticketd_b
|
||||||
v-else
|
v-if = "formData.ticket_ && localMode=='show'"
|
||||||
type="primary"
|
:t_id="formData.id"
|
||||||
style="margin-right: 4px;"
|
:ticket_="formData.ticket_"
|
||||||
@click="handleSave"
|
:ticket_data="ticket_data"
|
||||||
:loading="saveLoading"
|
@success="$emit('success', localMode)"
|
||||||
>提交审批</el-button>
|
ref="ticketd_b"
|
||||||
|
></ticketd_b>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-aside width="20%" v-if="formData.ticket_">
|
<el-aside width="20%" v-if="formData.ticket_">
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,16 @@
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable v-if="data_show" :data="tableData" row-key="id" border hidePagination hideDo>
|
<scTable
|
||||||
|
v-if="data_show"
|
||||||
|
ref="scTable"
|
||||||
|
:data="tableData"
|
||||||
|
row-key="id"
|
||||||
|
hidePagination
|
||||||
|
border
|
||||||
|
hideDo
|
||||||
|
>
|
||||||
|
<el-table-column type="index" fixed="left"></el-table-column>
|
||||||
<el-table-column label="物料编号" prop="number" min-width="170px" fixed="left">
|
<el-table-column label="物料编号" prop="number" min-width="170px" fixed="left">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id">
|
<el-table-column prop="note" :label="item.testitem_name" v-for="item in qct_testitems" :key="item.id">
|
||||||
|
|
@ -39,13 +48,13 @@
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-pagination
|
<el-pagination
|
||||||
|
small
|
||||||
background
|
background
|
||||||
:small="true"
|
layout="total, sizes,prev, pager, next"
|
||||||
:total="dataTotal"
|
:total="dataTotal"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
:page-size="params.page_size"
|
:page-size="params.page_size"
|
||||||
:page-sizes="[20, 50, 100, 200]"
|
:page-sizes="[20, 50, 100, 200]"
|
||||||
:current-page="params.page"
|
v-model="params.page"
|
||||||
@current-change="getData"
|
@current-change="getData"
|
||||||
@update:page-size="getData"
|
@update:page-size="getData"
|
||||||
></el-pagination>
|
></el-pagination>
|
||||||
|
|
@ -69,7 +78,9 @@ export default {
|
||||||
mioitem__material__type:30,
|
mioitem__material__type:30,
|
||||||
ftest__isnull:0,
|
ftest__isnull:0,
|
||||||
mioitem__mio__state:20,
|
mioitem__mio__state:20,
|
||||||
}
|
},
|
||||||
|
dataTotal:0,
|
||||||
|
apiObj:this.$API.inm.mioitemw.list,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,10 @@
|
||||||
>
|
>
|
||||||
<el-table-column label="员工" prop="员工" fixed="left">
|
<el-table-column label="员工" prop="员工" fixed="left">
|
||||||
</el-table-column>
|
</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 label="暗点" prop="暗点不合格">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="长点" prop="长点">
|
<el-table-column label="长点" prop="长点">
|
||||||
|
|
@ -58,10 +62,6 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="长点率" prop="长点率">
|
<el-table-column label="长点率" prop="长点率">
|
||||||
</el-table-column>
|
</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 label="加功率" prop="加功率">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="暗点系数" prop="暗点系数">
|
<el-table-column label="暗点系数" prop="暗点系数">
|
||||||
|
|
|
||||||
|
|
@ -729,7 +729,7 @@ export default {
|
||||||
countUseChange(){
|
countUseChange(){
|
||||||
if(this.form.count_real>this.form.count_use){
|
if(this.form.count_real>this.form.count_use){
|
||||||
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;
|
this.form.count_ok = this.form.count_use - this.form.count_notok;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
countNotOkSun() {
|
countNotOkSun() {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<span style="margin: 0 0 0 20px;" v-if="route_code=='pengma'">选择物料:</span>
|
<span style="margin: 0 0 0 20px;" v-if="route_code=='pengma'">选择物料:</span>
|
||||||
<el-input ref="codeInput"
|
<el-input ref="codeInput"
|
||||||
v-if="route_code=='pengma'"
|
|
||||||
placeholder="扫描交接物料"
|
placeholder="扫描交接物料"
|
||||||
v-model="listItem.wm_in" clearable
|
v-model="listItem.wm_in" clearable
|
||||||
style="width: 120px;margin: 0 10px;"
|
style="width: 120px;margin: 0 10px;"
|
||||||
|
|
@ -70,7 +69,7 @@
|
||||||
<span>{{ item3 }}</span>
|
<span>{{ item3 }}</span>
|
||||||
</div> -->
|
</div> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-else-if="route_code=='kaiaomian'" :span="24" style="padding-left: 80px;margin-bottom: 20px;margin-top: -5px;">
|
<el-col v-else :span="24" style="padding-left: 80px;margin-bottom: 20px;margin-top: -5px;">
|
||||||
<span v-for="(item2) in wprOptions" :key="item2.wpr" style="margin-right: 10px;">
|
<span v-for="(item2) in wprOptions" :key="item2.wpr" style="margin-right: 10px;">
|
||||||
<el-checkbox v-model="item2.checked" :label="item2.number" @change="handleChange($index)"/>
|
<el-checkbox v-model="item2.checked" :label="item2.number" @change="handleChange($index)"/>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -262,11 +261,12 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
//放入对应的行中的handoverb中,并且在列表中disabled
|
//放入对应的行中的handoverb中,并且在列表中disabled
|
||||||
that.wprOptions.forEach(item=>{
|
that.wprOptions.forEach(item=>{
|
||||||
if(item.number.indexOf(arr) > -1){
|
if(item.number.indexOf(number) > -1){
|
||||||
if(item.disabled){
|
if(item.disabled){
|
||||||
that.$message.error("该物料已被分配");
|
that.$message.error("该物料已被分配");
|
||||||
that.form.handoverb[index].wpr = '';
|
that.form.handoverb[index].wpr = '';
|
||||||
}else{
|
}else{
|
||||||
|
item.checked = true;
|
||||||
item.disabled = true;
|
item.disabled = true;
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.number = item.number;
|
obj.number = item.number;
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@
|
||||||
min-width="150"
|
min-width="150"
|
||||||
>
|
>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="route_code=='pengma'||route_code=='kaiaomian'" @click="rowClick(scope.row)" style="color:#0052d9;font-weight: 600;cursor: pointer;">{{scope.row.batch}}</span>
|
<span v-if="route_code=='pengma'||route_code=='kaiaomian'||route_code=='paoaomian'" @click="rowClick(scope.row)" style="color:#0052d9;font-weight: 600;cursor: pointer;">{{scope.row.batch}}</span>
|
||||||
<span v-else>{{scope.row.batch}}</span>
|
<span v-else>{{scope.row.batch}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -101,20 +101,15 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="物料" prop="material_name" min-width="120"></el-table-column>
|
||||||
label="物料"
|
|
||||||
prop="material_name"
|
|
||||||
min-width="120"
|
|
||||||
></el-table-column>
|
|
||||||
<el-table-column label="数量" prop="count" width="80"></el-table-column>
|
<el-table-column label="数量" prop="count" width="80"></el-table-column>
|
||||||
<el-table-column label="批次" prop="batch" width="60">
|
<el-table-column label="批次" prop="batch" min-width="60">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-text v-if="scope.row.handoverb.length>0" type="primary">{{scope.row.handoverb.length}}批</el-text>
|
<el-text v-if="scope.row.handoverb.length>0" type="primary">{{scope.row.handoverb.length}}批</el-text>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="新批次号" prop="new_batch" min-width="80">
|
<el-table-column label="新批次号" prop="new_batch" min-width="80">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="交接类型" prop="type" width="100">
|
<el-table-column label="交接类型" prop="type" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-text v-if="scope.row.mtype==20" type="warning">拆批</el-text>
|
<el-text v-if="scope.row.mtype==20" type="warning">拆批</el-text>
|
||||||
|
|
|
||||||
|
|
@ -186,8 +186,16 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="change_batch">
|
<el-col :md="12" :sm="24" v-if="change_batch">
|
||||||
<el-form-item label="新批次号" prop="new_batch">
|
<el-form-item label="新批次号" required>
|
||||||
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
<el-select filterable remote :remote-method="remoFun" v-model="new_batch" @selsect="new_batch_change">
|
||||||
|
<el-option
|
||||||
|
v-for="item in batchList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.batch"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <el-input v-model="form.new_batch" placeholder="新批次号"></el-input> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24" v-if="route_code=='tuihuo' || form.oinfo_json.test_file">
|
<el-col :md="12" :sm="24" v-if="route_code=='tuihuo' || form.oinfo_json.test_file">
|
||||||
|
|
@ -340,12 +348,14 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
new_batch:'',
|
||||||
listParams:{},
|
listParams:{},
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
mtype:10,
|
mtype:10,
|
||||||
deptID:'',
|
deptID:'',
|
||||||
route_code:'',
|
route_code:'',
|
||||||
codeText: "",
|
codeText: "",
|
||||||
|
batchList:[],
|
||||||
fileList:[],
|
fileList:[],
|
||||||
userList: [],
|
userList: [],
|
||||||
userList2: [],
|
userList2: [],
|
||||||
|
|
@ -406,6 +416,14 @@ export default {
|
||||||
}
|
}
|
||||||
that.getTid();
|
that.getTid();
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
batchList:{
|
||||||
|
deep:true,
|
||||||
|
handler (v) {
|
||||||
|
console.log('batchList',v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getTid (){
|
getTid (){
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
@ -514,6 +532,44 @@ export default {
|
||||||
that.userList2 = res;
|
that.userList2 = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
remoFun(val){
|
||||||
|
let that = this;
|
||||||
|
let params = {};
|
||||||
|
that.batchList = [];
|
||||||
|
params.material = that.form.handoverb[0].material;
|
||||||
|
params.batch = val;
|
||||||
|
params.mgroup = that.mgroupId;
|
||||||
|
params.count_all = 1;
|
||||||
|
params.defect = that.form.handoverb[0].defect!=null?that.form.handoverb[0].defect:'';
|
||||||
|
params.defect__isnull = that.form.handoverb[0].defect!=null?false:true;
|
||||||
|
params.page = 0;
|
||||||
|
that.$API.wpm.wmaterial.list.req(params).then(res=>{
|
||||||
|
if(res.length>0){
|
||||||
|
that.batchList = res;
|
||||||
|
}else{
|
||||||
|
let obj = {};
|
||||||
|
obj.batch = val;
|
||||||
|
obj.id = val;
|
||||||
|
that.batchList.push(obj);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
new_batch_change(){
|
||||||
|
let that = this;
|
||||||
|
let arr = that.batchList.filter(item=>{
|
||||||
|
return item.batch == that.new_batch;
|
||||||
|
})
|
||||||
|
if(arr.length>0){
|
||||||
|
that.form.new_batch = arr[0].batch;
|
||||||
|
}else{
|
||||||
|
that.batchList.forEach(item=>{
|
||||||
|
if(item.id == that.new_batch){
|
||||||
|
that.form.new_batch = item.batch;
|
||||||
|
that.form.new_wm = item.id;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
addMaterial(){
|
addMaterial(){
|
||||||
this.addShow = true;
|
this.addShow = true;
|
||||||
},
|
},
|
||||||
|
|
@ -538,6 +594,8 @@ export default {
|
||||||
obj.wm = item.wm;
|
obj.wm = item.wm;
|
||||||
obj.label = item.label;
|
obj.label = item.label;
|
||||||
obj.batch = item.batch;
|
obj.batch = item.batch;
|
||||||
|
obj.defect = item.defect;
|
||||||
|
obj.material = item.material;
|
||||||
obj.count_cando = item.count_canhandover;
|
obj.count_cando = item.count_canhandover;
|
||||||
obj.count = item.count_canhandover;
|
obj.count = item.count_canhandover;
|
||||||
this.form.handoverb.push(obj);
|
this.form.handoverb.push(obj);
|
||||||
|
|
@ -617,6 +675,23 @@ export default {
|
||||||
that.form.mtype=30;
|
that.form.mtype=30;
|
||||||
that.mtype==30
|
that.mtype==30
|
||||||
}
|
}
|
||||||
|
if(that.mtype==30&&that.form.new_batch==null&&that.form.new_batch==undefined&&that.new_batch!=''){
|
||||||
|
let arr = that.batchList.filter(item=>{
|
||||||
|
return item.batch == that.new_batch;
|
||||||
|
})
|
||||||
|
if(arr.length>0){
|
||||||
|
that.form.new_batch = arr[0].batch;
|
||||||
|
}else{
|
||||||
|
that.batchList.forEach(item=>{
|
||||||
|
if(item.id == that.new_batch){
|
||||||
|
that.form.new_batch = item.batch;
|
||||||
|
that.form.new_wm = item.id;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('that.form.new_wm',that.form.new_wm);
|
||||||
|
console.log('that.form.new_batch',that.form.new_batch);
|
||||||
if(that.mtype==20||that.mtype==30||that.type==40){
|
if(that.mtype==20||that.mtype==30||that.type==40){
|
||||||
that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {
|
that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
|
|
|
||||||
|
|
@ -324,6 +324,8 @@ export default {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.wm = item.id;
|
obj.wm = item.id;
|
||||||
obj.batch = item.batch;
|
obj.batch = item.batch;
|
||||||
|
obj.defect = item.defect;
|
||||||
|
obj.material = item.material;
|
||||||
obj.count_canhandover = item.count_canhandover;
|
obj.count_canhandover = item.count_canhandover;
|
||||||
obj.count = item.count_canhandover;
|
obj.count = item.count_canhandover;
|
||||||
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
|
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
|
||||||
|
|
|
||||||
|
|
@ -409,6 +409,8 @@ export default {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.wm = item.id;
|
obj.wm = item.id;
|
||||||
obj.batch = item.batch;
|
obj.batch = item.batch;
|
||||||
|
obj.defect = item.defect;
|
||||||
|
obj.material = item.material;
|
||||||
obj.count_canhandover = item.count_canhandover;
|
obj.count_canhandover = item.count_canhandover;
|
||||||
obj.count = item.count_canhandover;
|
obj.count = item.count_canhandover;
|
||||||
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
|
obj.label = item.defect !== null?item.batch+'('+item.material_name+')'+item.defect_name:item.batch+'('+item.material_name+')';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue