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);
|
||||
}
|
||||
},
|
||||
update: {
|
||||
req: async function(id, data){
|
||||
return await http.put(
|
||||
`${config.API_URL}/asm/assetcate/${id}/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function(id){
|
||||
|
|
@ -77,6 +84,13 @@ export default {
|
|||
data);
|
||||
}
|
||||
},
|
||||
update: {
|
||||
req: async function(id, data){
|
||||
return await http.put(
|
||||
`${config.API_URL}/asm/assetlog/${id}/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function(id){
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ const props = defineProps({
|
|||
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;
|
||||
// 控制 popover 显示与隐藏的状态
|
||||
const showPopover = ref(false);
|
||||
|
|
@ -170,6 +170,7 @@ const selectValue = computed({
|
|||
},
|
||||
set(val) {
|
||||
emit("update:modelValue", val);
|
||||
emit("update:label", selectLabel.value);
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,19 @@
|
|||
<el-form-item label="保管部门" required>
|
||||
<xtSelect
|
||||
v-model="formData.keep_dept"
|
||||
style="width: 100%;"
|
||||
:apiObj = "$API.system.dept.list"
|
||||
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>
|
||||
</xtSelect>
|
||||
|
|
@ -31,41 +40,71 @@
|
|||
:addTemplate="addTemplate"
|
||||
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">
|
||||
<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>
|
||||
</xtSelect>
|
||||
</template>
|
||||
</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">
|
||||
<el-input v-model="scope.row.name"></el-input>
|
||||
</template>
|
||||
</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">
|
||||
<el-input v-model="scope.row.specification"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="quantity" label="数量" width="180">
|
||||
<template #header>
|
||||
<span style="color: red">*</span>
|
||||
<span>数量</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<el-input-number v-model="scope.row.quantity" :min="1" :precision="0" controls-position="right"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="canuse_year" label="可用年限" width="180">
|
||||
<template #header>
|
||||
<span style="color: red">*</span>
|
||||
<span>可用年限</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<el-input-number v-model="scope.row.canuse_year" :min="1" :precision="0" controls-position="right"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="original_value" label="资产原值" width="180">
|
||||
<template #header>
|
||||
<span style="color: red">*</span>
|
||||
<span>资产原值</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<el-input-number v-model="scope.row.original_value" :min="1" :precision="2" controls-position="right"></el-input-number>
|
||||
</template>
|
||||
</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">
|
||||
<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>
|
||||
</el-table-column>
|
||||
<el-table-column prop="location" label="存放地点">
|
||||
|
|
@ -83,21 +122,21 @@
|
|||
@click="handleDel"
|
||||
:loading="saveLoading"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
v-if="localMode!='show'"
|
||||
type="primary"
|
||||
style="margin-right: 4px;"
|
||||
@click="handleSave"
|
||||
: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>
|
||||
v-if = "formData.ticket_ && localMode=='show'"
|
||||
:t_id="formData.id"
|
||||
:ticket_="formData.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
@success="$emit('success', localMode)"
|
||||
ref="ticketd_b"
|
||||
></ticketd_b>
|
||||
</el-footer>
|
||||
</el-main>
|
||||
<el-aside width="20%" v-if="formData.ticket_">
|
||||
|
|
@ -136,7 +175,8 @@ export default {
|
|||
localMode: this.mode,
|
||||
saveLoading: false,
|
||||
addTemplate: {
|
||||
name: null,
|
||||
quantity: 1,
|
||||
canuse_year: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -150,7 +190,7 @@ export default {
|
|||
methods: {
|
||||
async getTid() {
|
||||
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;
|
||||
if (res.ticket_ && res.ticket_.state_.type == 1 && res.create_by == this.$TOOL.data.get("USER_INFO").id) {
|
||||
this.localMode = "edit";
|
||||
|
|
@ -164,7 +204,7 @@ export default {
|
|||
type: "warning",
|
||||
})
|
||||
.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.$emit('success');
|
||||
})
|
||||
|
|
@ -173,7 +213,7 @@ export default {
|
|||
async handleSave() {
|
||||
if (this.localMode == "add") {
|
||||
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.$emit('success', this.localMode);
|
||||
} catch (error) {
|
||||
|
|
@ -181,7 +221,15 @@ export default {
|
|||
throw error;
|
||||
}
|
||||
} 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"
|
||||
: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-button
|
||||
v-if="localMode!='show'"
|
||||
type="primary"
|
||||
style="margin-right: 4px;"
|
||||
@click="handleSave"
|
||||
:loading="saveLoading"
|
||||
>提交审批</el-button>
|
||||
<ticketd_b
|
||||
v-if = "formData.ticket_ && localMode=='show'"
|
||||
:t_id="formData.id"
|
||||
:ticket_="formData.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
@success="$emit('success', localMode)"
|
||||
ref="ticketd_b"
|
||||
></ticketd_b>
|
||||
</el-footer>
|
||||
</el-main>
|
||||
<el-aside width="20%" v-if="formData.ticket_">
|
||||
|
|
|
|||
|
|
@ -42,20 +42,21 @@
|
|||
@click="handleDel"
|
||||
:loading="saveLoading"
|
||||
>删除</el-button>
|
||||
<ticketd_b
|
||||
v-if = "formData.ticket_"
|
||||
:t_id="formData.id"
|
||||
:ticket_="formData.ticket_"
|
||||
@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-button
|
||||
v-if="localMode!='show'"
|
||||
type="primary"
|
||||
style="margin-right: 4px;"
|
||||
@click="handleSave"
|
||||
:loading="saveLoading"
|
||||
>提交审批</el-button>
|
||||
<ticketd_b
|
||||
v-if = "formData.ticket_ && localMode=='show'"
|
||||
:t_id="formData.id"
|
||||
:ticket_="formData.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
@success="$emit('success', localMode)"
|
||||
ref="ticketd_b"
|
||||
></ticketd_b>
|
||||
</el-footer>
|
||||
</el-main>
|
||||
<el-aside width="20%" v-if="formData.ticket_">
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@
|
|||
v-auth="'mio.submit'"
|
||||
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>
|
||||
</el-button>
|
||||
<el-button
|
||||
|
|
@ -207,9 +207,15 @@ export default {
|
|||
type: "",
|
||||
cate: "good",
|
||||
mioId: "",
|
||||
project_code: "",
|
||||
visibleDrawer: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let config_base = that.$TOOL.data.get("BASE_INFO").base;
|
||||
that.project_code = config_base.base_code;
|
||||
},
|
||||
methods: {
|
||||
//添加
|
||||
add(type) {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料单价">
|
||||
<el-form-item label="物料单价" v-if="form.type != 'do_in'||form.type != 'do_out'">
|
||||
<el-input-number
|
||||
v-model="form.unit_price"
|
||||
:min="0"
|
||||
|
|
@ -534,7 +534,9 @@ export default {
|
|||
if(that.form.batch == item.batch){
|
||||
that.form.count = item.count;
|
||||
that.form.wm = item.id;
|
||||
that.batchcount = item.count;
|
||||
if(!that.assembShow){
|
||||
that.batchcount = item.count;
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
@ -558,7 +560,7 @@ export default {
|
|||
} else {
|
||||
this.getBatchOptions();
|
||||
}
|
||||
if(that.type == 'pur_in'){
|
||||
if(that.form.type == 'pur_in'||that.form.type == 'other_in'||that.assembShow){
|
||||
that.batchcount = 99999999999;
|
||||
if(that.project_code=='gx'){
|
||||
that.form.batch = '无'
|
||||
|
|
|
|||
|
|
@ -51,20 +51,21 @@
|
|||
style="margin-right: 4px;"
|
||||
@click="handleDel"
|
||||
>删除</el-button>
|
||||
<ticketd_b
|
||||
v-if ="formData.ticket_"
|
||||
:t_id="formData.id"
|
||||
:ticket_="formData.ticket_"
|
||||
@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-button
|
||||
v-if="localMode!='show'"
|
||||
type="primary"
|
||||
style="margin-right: 4px;"
|
||||
@click="handleSave"
|
||||
:loading="saveLoading"
|
||||
>提交审批</el-button>
|
||||
<ticketd_b
|
||||
v-if = "formData.ticket_ && localMode=='show'"
|
||||
:t_id="formData.id"
|
||||
:ticket_="formData.ticket_"
|
||||
:ticket_data="ticket_data"
|
||||
@success="$emit('success', localMode)"
|
||||
ref="ticketd_b"
|
||||
></ticketd_b>
|
||||
</el-footer>
|
||||
</el-main>
|
||||
<el-aside width="20%" v-if="formData.ticket_">
|
||||
|
|
|
|||
|
|
@ -16,7 +16,16 @@
|
|||
</div>
|
||||
</el-header>
|
||||
<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>
|
||||
<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-footer>
|
||||
<el-pagination
|
||||
small
|
||||
background
|
||||
:small="true"
|
||||
layout="total, sizes,prev, pager, next"
|
||||
:total="dataTotal"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:page-size="params.page_size"
|
||||
:page-sizes="[20, 50, 100, 200]"
|
||||
:current-page="params.page"
|
||||
v-model="params.page"
|
||||
@current-change="getData"
|
||||
@update:page-size="getData"
|
||||
></el-pagination>
|
||||
|
|
@ -69,7 +78,9 @@ export default {
|
|||
mioitem__material__type:30,
|
||||
ftest__isnull:0,
|
||||
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>
|
||||
<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="长点">
|
||||
|
|
@ -58,10 +62,6 @@
|
|||
</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="暗点系数">
|
||||
|
|
|
|||
|
|
@ -729,7 +729,7 @@ export default {
|
|||
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;
|
||||
this.form.count_ok = this.form.count_use - this.form.count_notok;
|
||||
}
|
||||
},
|
||||
countNotOkSun() {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
<el-col :span="14">
|
||||
<span style="margin: 0 0 0 20px;" v-if="route_code=='pengma'">选择物料:</span>
|
||||
<el-input ref="codeInput"
|
||||
v-if="route_code=='pengma'"
|
||||
placeholder="扫描交接物料"
|
||||
v-model="listItem.wm_in" clearable
|
||||
style="width: 120px;margin: 0 10px;"
|
||||
|
|
@ -70,7 +69,7 @@
|
|||
<span>{{ item3 }}</span>
|
||||
</div> -->
|
||||
</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;">
|
||||
<el-checkbox v-model="item2.checked" :label="item2.number" @change="handleChange($index)"/>
|
||||
</span>
|
||||
|
|
@ -262,11 +261,12 @@ export default {
|
|||
}else{
|
||||
//放入对应的行中的handoverb中,并且在列表中disabled
|
||||
that.wprOptions.forEach(item=>{
|
||||
if(item.number.indexOf(arr) > -1){
|
||||
if(item.number.indexOf(number) > -1){
|
||||
if(item.disabled){
|
||||
that.$message.error("该物料已被分配");
|
||||
that.form.handoverb[index].wpr = '';
|
||||
}else{
|
||||
item.checked = true;
|
||||
item.disabled = true;
|
||||
let obj = {};
|
||||
obj.number = item.number;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
min-width="150"
|
||||
>
|
||||
<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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
|||
|
|
@ -101,20 +101,15 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="物料"
|
||||
prop="material_name"
|
||||
min-width="120"
|
||||
></el-table-column>
|
||||
<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="batch" width="60">
|
||||
<el-table-column label="批次" prop="batch" min-width="60">
|
||||
<template #default="scope">
|
||||
<el-text v-if="scope.row.handoverb.length>0" type="primary">{{scope.row.handoverb.length}}批</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="新批次号" prop="new_batch" min-width="80">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="交接类型" prop="type" width="100">
|
||||
<template #default="scope">
|
||||
<el-text v-if="scope.row.mtype==20" type="warning">拆批</el-text>
|
||||
|
|
|
|||
|
|
@ -186,8 +186,16 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="change_batch">
|
||||
<el-form-item label="新批次号" prop="new_batch">
|
||||
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
||||
<el-form-item label="新批次号" required>
|
||||
<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-col>
|
||||
<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:{},
|
||||
totalCount: 0,
|
||||
mtype:10,
|
||||
deptID:'',
|
||||
route_code:'',
|
||||
codeText: "",
|
||||
batchList:[],
|
||||
fileList:[],
|
||||
userList: [],
|
||||
userList2: [],
|
||||
|
|
@ -406,6 +416,14 @@ export default {
|
|||
}
|
||||
that.getTid();
|
||||
},
|
||||
watch: {
|
||||
batchList:{
|
||||
deep:true,
|
||||
handler (v) {
|
||||
console.log('batchList',v)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTid (){
|
||||
var that = this;
|
||||
|
|
@ -514,6 +532,44 @@ export default {
|
|||
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(){
|
||||
this.addShow = true;
|
||||
},
|
||||
|
|
@ -538,6 +594,8 @@ export default {
|
|||
obj.wm = item.wm;
|
||||
obj.label = item.label;
|
||||
obj.batch = item.batch;
|
||||
obj.defect = item.defect;
|
||||
obj.material = item.material;
|
||||
obj.count_cando = item.count_canhandover;
|
||||
obj.count = item.count_canhandover;
|
||||
this.form.handoverb.push(obj);
|
||||
|
|
@ -617,6 +675,23 @@ export default {
|
|||
that.form.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){
|
||||
that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {
|
||||
that.isSaveing = false;
|
||||
|
|
|
|||
|
|
@ -324,6 +324,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.wm = item.id;
|
||||
obj.batch = item.batch;
|
||||
obj.defect = item.defect;
|
||||
obj.material = item.material;
|
||||
obj.count_canhandover = 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+')';
|
||||
|
|
|
|||
|
|
@ -409,6 +409,8 @@ export default {
|
|||
let obj = {};
|
||||
obj.wm = item.id;
|
||||
obj.batch = item.batch;
|
||||
obj.defect = item.defect;
|
||||
obj.material = item.material;
|
||||
obj.count_canhandover = 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+')';
|
||||
|
|
|
|||
Loading…
Reference in New Issue