fix:coding#822#825#826

This commit is contained in:
shijing 2025-05-13 10:31:48 +08:00
parent 2c29fe6691
commit 5fbcf76cf9
3 changed files with 45 additions and 50 deletions

View File

@ -143,10 +143,9 @@
label="操作" label="操作"
fixed="right" fixed="right"
align="center" align="center"
width="100px" width="150px"
> >
<template #default="scope"> <template #default="scope">
<el-button <el-button
link link
type="primary" type="primary"
@ -157,6 +156,14 @@
> >
检验 检验
</el-button> </el-button>
<scFileImport
v-if="project_code=='bxerp'&&mioObj.state == 10 &&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')"
:templateUrl="checkTemplate"
accept=".xlsx"
:apiObj="$API.common.upload"
@success="upSuccess"
>
</scFileImport>
<el-button <el-button
link link
type="primary" type="primary"
@ -275,14 +282,17 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { ElLoading } from "element-plus";
import saveDialog from "./mioitem_form.vue"; import saveDialog from "./mioitem_form.vue";
import checkDialog from "./mioitem_check.vue"; import checkDialog from "./mioitem_check.vue";
import print from "./../setting/print/A4.vue"; import print from "./../setting/print/A4.vue";
import scFileImport from "@/components/scFileImport";
export default { export default {
name: "mioitem", name: "mioitem",
components: { components: {
saveDialog, saveDialog,
checkDialog, checkDialog,
scFileImport,
print print
}, },
props: { props: {
@ -335,14 +345,12 @@ export default {
project_code:'', project_code:'',
setNameVisible:false, setNameVisible:false,
wprVisibleDrawer:false, wprVisibleDrawer:false,
printer_name:localStorage.getItem("printer_name") printer_name:localStorage.getItem("printer_name"),
checkTemplate: " /media/default/template/mioitemw_t.xlsx",
}; };
}, },
mounted() { mounted() {
// this.type = this.$route.query.type; this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
// this.cate = this.$route.query.cate;
// this.mioId = this.$route.query.mio;
// this.params.mio = this.$route.query.mio;
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code; this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
this.params.mio = this.mioId; this.params.mio = this.mioId;
this.apiObj = this.$API.inm.mioitem.list; this.apiObj = this.$API.inm.mioitem.list;
@ -477,6 +485,21 @@ export default {
that.wprList = row.mioitemw; that.wprList = row.mioitemw;
that.wprVisibleDrawer = true; that.wprVisibleDrawer = true;
}, },
upSuccess(res, close) {
close();
const loading = ElLoading.service({
fullscreen: true,
text: "解析中...请稍等",
});
this.$API.mtm.material.daoru.req({ path: res.path }).then((res) => {
loading.close();
this.$message.success("导入成功");
this.$refs.table.queryData(this.query);
}).catch((err) => {
loading.close();
this.$message.error("导入失败,请重新尝试");
});
},
// //
printMaterial(row,type){ printMaterial(row,type){
let that = this; let that = this;

View File

@ -331,6 +331,8 @@ export default {
apiObjPrint:this.$API.cm.labelmat.fromWm, apiObjPrint:this.$API.cm.labelmat.fromWm,
printer_name:localStorage.getItem("printer_name"), printer_name:localStorage.getItem("printer_name"),
mgroup_name:'', mgroup_name:'',
ofrom_name:'',
ofrom_batch :'',
checkItem:{}, checkItem:{},
}; };
}, },
@ -446,6 +448,8 @@ export default {
}, },
showWpr(row){ showWpr(row){
let that = this; let that = this;
that.ofrom_name = row.material_ofrom_name;
that.ofrom_batch = row.batch;
that.wprParams.wm = row.id; that.wprParams.wm = row.id;
that.wprVisibleDrawer = true; that.wprVisibleDrawer = true;
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => { this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
@ -481,13 +485,15 @@ export default {
}else if(type=='wpr'){ }else if(type=='wpr'){
let params = {}; let params = {};
let name = row.material_name.split('|')[0]; let name = row.material_name.split('|')[0];
if(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'){ if(that.route_code=='paiban'||that.route_code=='zhuangmo'||that.route_code=='zlybcl'||that.route_code=='tuomoceliang'||
that.route_code=='reyatuihuo'||that.route_code=='banduangunyuan'||that.route_code=='banduangunyuanhoudama'||that.route_code=='banduangunyuantuihuo'
){
params.label_template_name = '排扳单件打印模板'; params.label_template_name = '排扳单件打印模板';
let oinfo = []; let oinfo = [];
for(let key in row.oinfo){ for(let key in row.oinfo){
oinfo.push(row.oinfo[key]) oinfo.push(row.oinfo[key])
} }
let data = {sigao:'',duibian:'',istest:'否',number:row.number,name:name}; let data = {sigao:'',duibian:'',istest:'否',number:row.number,name:name,ofrom_name:that.ofrom_name,ofrom_batch:that.ofrom_batch};
if(oinfo.length>0){ if(oinfo.length>0){
oinfo.forEach((item)=>{ oinfo.forEach((item)=>{
if(item.name=="丝高"){ if(item.name=="丝高"){

View File

@ -17,24 +17,6 @@
style="padding: 0 10px" style="padding: 0 10px"
> >
<el-row> <el-row>
<!-- <el-col :md="12" :sm="12" :xs="24" v-if="mgroupMtype==20">
<el-form-item label="生产类型" prop="mtype">
<el-select
v-model="form.mtype"
placeholder="生产类型"
clearable
:disabled="mode == 'edit'"
style="width: 100%"
>
<el-option
v-for="item in typeOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :md="12" :sm="12" :xs="24" v-if="mgroupMtype == 20"> <el-col :md="12" :sm="12" :xs="24" v-if="mgroupMtype == 20">
<el-form-item <el-form-item
label="外协单位" label="外协单位"
@ -57,25 +39,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :md="12" :sm="12" :xs="24" v-if="mode=='add'&&mlogtype!=='rework'">
<el-form-item label="关联任务" prop="mtask">
<el-select
v-model="form.mtask"
placeholder="关联任务"
clearable
style="width: 100%"
@change="changeMtask"
>
<el-option
v-for="item in mtaskOptions"
:key="item.id"
:label="item.number"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col v-if="mlogtype!=='rework'"> <el-col v-if="mlogtype!=='rework'">
<el-form-item label="工艺路线"> <el-form-item label="工艺路线">
<el-select <el-select
@ -96,7 +59,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24" v-if="route_code!=='niuzhuan'"> <el-col :md="12" :sm="12" :xs="24" v-if="route_code!=='niuzhuan'">
<el-form-item label="生产设备"> <el-form-item label="生产设备" prop="equipment">
<el-select <el-select
v-model="form.equipment" v-model="form.equipment"
placeholder="生产设备" placeholder="生产设备"
@ -297,10 +260,10 @@ export default {
trigger: "blur", trigger: "blur",
}, },
], ],
work_start_time: [ equipment: [
{ {
required: true, required: false,
message: "请选择生产开始时间", message: "该工序涉及设备采集请选择生产设备",
trigger: "blur", trigger: "blur",
}, },
], ],
@ -352,6 +315,9 @@ export default {
this.getEquipment(); this.getEquipment();
this.getMtask(); this.getMtask();
this.gettestitem(); this.gettestitem();
if(this.route_code=='ladansi'||this.route_code=='yicifusi'||this.route_code=='ercifusi'||this.route_code=='zlybcl'){
this.rules.equipment[0].required = true;
}
}, },
methods: { methods: {
disabledDateFn(time) { disabledDateFn(time) {