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="操作"
fixed="right"
align="center"
width="100px"
width="150px"
>
<template #default="scope">
<el-button
link
type="primary"
@ -157,6 +156,14 @@
>
检验
</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
link
type="primary"
@ -275,14 +282,17 @@
</el-dialog>
</template>
<script>
import { ElLoading } from "element-plus";
import saveDialog from "./mioitem_form.vue";
import checkDialog from "./mioitem_check.vue";
import print from "./../setting/print/A4.vue";
import scFileImport from "@/components/scFileImport";
export default {
name: "mioitem",
components: {
saveDialog,
checkDialog,
scFileImport,
print
},
props: {
@ -335,14 +345,12 @@ export default {
project_code:'',
setNameVisible:false,
wprVisibleDrawer:false,
printer_name:localStorage.getItem("printer_name")
printer_name:localStorage.getItem("printer_name"),
checkTemplate: " /media/default/template/mioitemw_t.xlsx",
};
},
mounted() {
// this.type = this.$route.query.type;
// this.cate = this.$route.query.cate;
// this.mioId = this.$route.query.mio;
// this.params.mio = this.$route.query.mio;
this.checkTemplate = this.checkTemplate+"?t=" + new Date().getTime();
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
this.params.mio = this.mioId;
this.apiObj = this.$API.inm.mioitem.list;
@ -477,6 +485,21 @@ export default {
that.wprList = row.mioitemw;
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){
let that = this;

View File

@ -331,6 +331,8 @@ export default {
apiObjPrint:this.$API.cm.labelmat.fromWm,
printer_name:localStorage.getItem("printer_name"),
mgroup_name:'',
ofrom_name:'',
ofrom_batch :'',
checkItem:{},
};
},
@ -446,6 +448,8 @@ export default {
},
showWpr(row){
let that = this;
that.ofrom_name = row.material_ofrom_name;
that.ofrom_batch = row.batch;
that.wprParams.wm = row.id;
that.wprVisibleDrawer = true;
this.$API.wpm.wpr.list.req(that.wprParams).then((res) => {
@ -481,13 +485,15 @@ export default {
}else if(type=='wpr'){
let params = {};
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 = '排扳单件打印模板';
let oinfo = [];
for(let key in row.oinfo){
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){
oinfo.forEach((item)=>{
if(item.name=="丝高"){

View File

@ -17,24 +17,6 @@
style="padding: 0 10px"
>
<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-form-item
label="外协单位"
@ -57,25 +39,6 @@
</el-select>
</el-form-item>
</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-form-item label="工艺路线">
<el-select
@ -96,7 +59,7 @@
</el-form-item>
</el-col>
<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
v-model="form.equipment"
placeholder="生产设备"
@ -297,10 +260,10 @@ export default {
trigger: "blur",
},
],
work_start_time: [
equipment: [
{
required: true,
message: "请选择生产开始时间",
required: false,
message: "该工序涉及设备采集请选择生产设备",
trigger: "blur",
},
],
@ -352,6 +315,9 @@ export default {
this.getEquipment();
this.getMtask();
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: {
disabledDateFn(time) {