6 changed files with 914 additions and 12 deletions
-
18src/api/sampleManagement/technicalSpecificationList.js
-
5src/assets/scss/rq.scss
-
421src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_inkFormulation.vue
-
20src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_inkMixing.vue
-
436src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_lamination.vue
-
26src/views/modules/sampleManagement/technicalSpecificationDetail/technicalSpecificationDetail.vue
@ -0,0 +1,421 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;" v-if="searchData.buNo==='DBE'"> |
|||
<el-form-item > |
|||
<el-button type="primary" @click="colorSearch()" >刷新</el-button> |
|||
<el-button type="primary" @click="newColor()" v-if="!ifDisableFlag">新增</el-button> |
|||
</el-form-item> |
|||
<el-table |
|||
height="400" |
|||
:data="colorTable" |
|||
border |
|||
style="width: 100%"> |
|||
<el-table-column |
|||
prop="" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="30" |
|||
v-if="!ifDisableFlag" |
|||
label="操作"> |
|||
<template slot-scope="scope"> |
|||
<a type="text" size="small" @click="updateColor(scope.row)">编辑</a> |
|||
<a type="text" size="small" @click="deleteColor(scope.row)">删除</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="order" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="40" |
|||
label="色序"> |
|||
</el-table-column> |
|||
<el-table-column label="Printing/印刷" header-align="center"> |
|||
<el-table-column |
|||
prop="hardness" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="刮胶硬度"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="tartness" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="刮胶锋利度"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="printingSide" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="印刷面(正反面)"> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="UV Dring/UV烘干" header-align="center"> |
|||
<el-table-column |
|||
prop="energy" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="能量区间"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="drySpeed" |
|||
header-align="center" |
|||
align="right" |
|||
min-width="60" |
|||
label="传输带速度"> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="自然干燥" header-align="center"> |
|||
<el-table-column |
|||
prop="dryTime" |
|||
header-align="center" |
|||
align="right" |
|||
min-width="60" |
|||
label="干燥时间(分钟)"> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
<el-table-column label="Oven Dring/烘箱干燥" header-align="center"> |
|||
<el-table-column |
|||
prop="dryTemp" |
|||
header-align="center" |
|||
align="right" |
|||
min-width="60" |
|||
label="干燥温度(摄氏度)"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="dryTime2" |
|||
header-align="center" |
|||
align="right" |
|||
min-width="60" |
|||
label="干燥时间(分钟)"> |
|||
</el-table-column> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="24"><div class="grid-content bg-purple"> |
|||
<el-form-item :label="'备注/Remarks'"> |
|||
<el-input |
|||
type="textarea" |
|||
v-model="dataForm.remarks " |
|||
:rows="3" |
|||
resize='none' |
|||
maxlength="120" |
|||
show-word-limit |
|||
:disabled="ifDisableFlag" |
|||
style="height: 60px" > |
|||
</el-input> |
|||
</el-form-item> |
|||
</div></el-col> |
|||
</el-row> |
|||
<el-row :gutter="20" style="margin-top: 60px"> |
|||
<el-col :span="6"><div class="grid-content bg-purple"> |
|||
<el-form-item :label="'标签尺寸/Label Size'"> |
|||
<el-input v-model="dataForm.labelSize" :disabled="ifDisableFlag" ></el-input> |
|||
</el-form-item> |
|||
</div></el-col> |
|||
<el-col :span="6"><div class="grid-content bg-purple"> |
|||
<el-form-item :label="'主材/QPA'"> |
|||
<el-input v-model="dataForm.qpa" :disabled="ifDisableFlag" ></el-input> |
|||
</el-form-item> |
|||
</div></el-col> |
|||
</el-row> |
|||
<el-row :gutter="20" style=""> |
|||
<el-col :span="6"><div class="grid-content bg-purple"> |
|||
<el-form-item :label="'横排数/No.of Cross'"> |
|||
<el-input v-model="dataForm.cross" :disabled="ifDisableFlag" type="number" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input> |
|||
</el-form-item> |
|||
</div></el-col> |
|||
<el-col :span="6"><div class="grid-content bg-purple"> |
|||
<el-form-item :label="'横向跳距/HP'"> |
|||
<el-input v-model="dataForm.hp" :disabled="ifDisableFlag" type="number" ></el-input> |
|||
</el-form-item> |
|||
</div></el-col> |
|||
<el-col :span="6"><div class="grid-content bg-purple"> |
|||
<el-form-item :label="'纵列数/No.of Row'" > |
|||
<el-input v-model="dataForm.row" :disabled="ifDisableFlag" type="number" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input> |
|||
</el-form-item> |
|||
</div></el-col> |
|||
<el-col :span="6"><div class="grid-content bg-purple"> |
|||
<el-form-item :label="'纵向跳距/VP'" > |
|||
<el-input v-model="dataForm.vp" :disabled="ifDisableFlag" type="number" ></el-input> |
|||
</el-form-item> |
|||
</div></el-col> |
|||
</el-row> |
|||
<el-row :gutter="20" > |
|||
<el-col :span="24"><div class="grid-content bg-purple"> |
|||
<el-form-item :label="'Action'"> |
|||
<el-input |
|||
type="textarea" |
|||
v-model="dataForm.action " |
|||
:rows="3" |
|||
resize='none' |
|||
maxlength="120" |
|||
show-word-limit |
|||
:disabled="ifDisableFlag" |
|||
style="height: 60px" > |
|||
</el-input> |
|||
</el-form-item> |
|||
</div></el-col> |
|||
</el-row> |
|||
</el-form> |
|||
|
|||
<el-form label-position="top" style="margin-top:60px; margin-left: 0px;text-align:center"> |
|||
<el-button type="primary" @click="saveData()" v-if="searchData.buNo==='DBE'" >保存</el-button> |
|||
</el-form> |
|||
|
|||
|
|||
<el-dialog title="颜色信息" :close-on-click-modal="false" v-drag :visible.sync="colorFlag" width="600px"> |
|||
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|||
<el-form-item :label="'色序'"> |
|||
<el-input v-model="colorData.order" type="number" style="width: 130px" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'刮胶硬度'"> |
|||
<el-input v-model="colorData.hardness" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'刮胶锋利度'"> |
|||
<el-input v-model="colorData.tartness" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'印刷面(正反面)'"> |
|||
<el-input v-model="colorData.printingSide" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|||
<el-form-item :label="'能量区间'"> |
|||
<el-input v-model="colorData.energy" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'传输带速度'"> |
|||
<el-input v-model="colorData.drySpeed" type="number" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'自然干燥时间(分钟)'"> |
|||
<el-input v-model="colorData.dryTime" type="number" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|||
<el-form-item :label="'干燥温度(摄氏度)'"> |
|||
<el-input v-model="colorData.dryTemp" type="number" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'烘箱干燥时间(分钟)'"> |
|||
<el-input v-model="colorData.dryTime2" type="number" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|||
<el-button type="primary" @click="colorSave()">保存</el-button> |
|||
<el-button type="primary" @click="colorFlag = false">取消</el-button> |
|||
</el-footer> |
|||
</el-dialog> |
|||
|
|||
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
searchBMInkFormulationDetail, |
|||
updateBMInkFormulationDetail, |
|||
searchBMInkFormulationColor, |
|||
saveBMInkFormulationColor, |
|||
deleteBMInkFormulationColor, |
|||
} from "@/api/sampleManagement/technicalSpecificationList.js" |
|||
import Chooselist from '@/views/modules/common/Chooselist' |
|||
export default { |
|||
components: { |
|||
Chooselist |
|||
}, |
|||
data() { |
|||
return { |
|||
searchData: { |
|||
site: '', |
|||
username: this.$store.state.user.name, |
|||
codeNo: '', |
|||
buNo:'', |
|||
}, |
|||
ifDisableFlag:false, |
|||
dataForm:{ |
|||
site: '', |
|||
codeNo:'', |
|||
labelSize:'', |
|||
qpa:'', |
|||
cross:'', |
|||
hp:'', |
|||
row:'', |
|||
VP:'', |
|||
action:'', |
|||
remarks:'', |
|||
|
|||
}, |
|||
colorTable:[], |
|||
colorData:{ |
|||
id:'', |
|||
site: '', |
|||
codeNo:'', |
|||
order:'', |
|||
hardness:'', |
|||
tartness:'', |
|||
printingSide:'', |
|||
energy:'', |
|||
drySpeed:'', |
|||
dryTime:'', |
|||
dryTemp:'', |
|||
dryTime2:'', |
|||
updateBy:'', |
|||
updateDate:'', |
|||
}, |
|||
colorFlag:false, |
|||
} |
|||
}, |
|||
methods: { |
|||
// 获取基础数据列表S |
|||
getBaseList (val, type) { |
|||
this.tagNo = val |
|||
this.tagNo1 = type |
|||
this.$nextTick(() => { |
|||
let strVal = '' |
|||
if (val === 1013) { |
|||
if(type==1) { |
|||
strVal = this.dataForm.partType |
|||
} |
|||
} |
|||
this.$refs.baseList.init(val, strVal) |
|||
}) |
|||
}, |
|||
/* 列表方法的回调 */ |
|||
getBaseData (val) { |
|||
if (this.tagNo === 1013) { |
|||
if(this.tagNo1==1) { |
|||
this.dataForm.partType = val.Base_id |
|||
this.dataForm.partTypeDesc = val.Base_desc |
|||
} |
|||
} |
|||
}, |
|||
//初始化组件的参数 |
|||
init(inData) { |
|||
if(this.dataForm.codeNo!=null&&this.dataForm.codeNo!=''){ |
|||
return false; |
|||
} |
|||
//初始化参数 |
|||
this.searchData = JSON.parse(JSON.stringify(inData)); |
|||
//刷新表格 |
|||
this.searchTable(); |
|||
this.colorSearch(); |
|||
|
|||
}, |
|||
searchTable(){ |
|||
searchBMInkFormulationDetail(this.searchData).then(({data}) => { |
|||
if(data.rows.length>0){ |
|||
this.dataForm = data.rows[0]; |
|||
}else { |
|||
this.dataForm.site=this.searchData.site |
|||
this.dataForm.codeNo=this.searchData.codeNo |
|||
} |
|||
}); |
|||
}, |
|||
saveData(){ |
|||
this.$confirm("是否保存信息?", '保存提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
}).then(() => { |
|||
updateBMInkFormulationDetail(this.dataForm).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.$message.success( '操作成功') |
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}).catch(() => { |
|||
return |
|||
}) |
|||
}, |
|||
|
|||
newColor(){ |
|||
if(this.searchData.codeNo==''){ |
|||
this.$message.success('数据错误,请关闭页面重试!') |
|||
return false; |
|||
} |
|||
let number=1; |
|||
for (let i = 0; i <this.colorTable.length ; i++) { |
|||
if(number<=this.colorTable[i].order){ |
|||
number=Number(this.colorTable[i].order)+1 |
|||
} |
|||
} |
|||
this.colorData={ |
|||
id:0, |
|||
site: this.searchData.site, |
|||
codeNo:this.searchData.codeNo, |
|||
order:number, |
|||
hardness:'', |
|||
tartness:'', |
|||
printingSide:'', |
|||
energy:'', |
|||
drySpeed:'', |
|||
dryTime:'', |
|||
dryTemp:'', |
|||
dryTime2:'', |
|||
updateBy:'', |
|||
updateDate:'', |
|||
} |
|||
this.colorFlag=true; |
|||
}, |
|||
updateColor(row){ |
|||
this.colorData=JSON.parse(JSON.stringify(row)) |
|||
this.colorFlag=true; |
|||
}, |
|||
|
|||
colorSearch(){ |
|||
searchBMInkFormulationColor(this.searchData).then(({data}) => { |
|||
this.colorTable = data.rows |
|||
}); |
|||
}, |
|||
colorSave(){ |
|||
this.$confirm("是否保存信息?", '保存提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
}).then(() => { |
|||
saveBMInkFormulationColor(this.colorData).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.colorSearch(); |
|||
this.colorFlag=false |
|||
this.$message.success( '操作成功') |
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}).catch(() => { |
|||
|
|||
}) |
|||
}, |
|||
deleteColor(row){ |
|||
this.$confirm(`是否删除这条信息?`, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
deleteBMInkFormulationColor(row).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.colorSearch(); |
|||
this.$message({ |
|||
message: '操作成功', |
|||
type: 'success', |
|||
duration: 1500, |
|||
onClose: () => {} |
|||
}) |
|||
} else { |
|||
this.$alert(data.msg, '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
} |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
}, |
|||
|
|||
|
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,436 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;" v-if="searchData.buNo==='DBE'||searchData.buNo==='SS'"> |
|||
<el-form-item > |
|||
<el-button type="primary" @click="cutSearch()" >刷新</el-button> |
|||
<el-button type="primary" @click="newCut()" v-if="!ifDisableFlag">新增</el-button> |
|||
</el-form-item> |
|||
<el-table |
|||
height="400" |
|||
:data="cutTable" |
|||
border |
|||
style="width: 100%"> |
|||
<el-table-column |
|||
prop="" |
|||
header-align="center" |
|||
align="center" |
|||
min-width="30" |
|||
v-if="!ifDisableFlag" |
|||
label="操作"> |
|||
<template slot-scope="scope"> |
|||
<a type="text" size="small" @click="updateCut(scope.row)">编辑</a> |
|||
<a type="text" size="small" @click="deleteCut(scope.row)">删除</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:prop="item.columnProp" |
|||
header-align="center" |
|||
:align="item.align" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
<el-row :gutter="20" > |
|||
<el-col :span="24"><div class="grid-content bg-purple"> |
|||
<el-form-item :label="'Action'"> |
|||
<el-input |
|||
type="textarea" |
|||
v-model="dataForm.action " |
|||
:rows="3" |
|||
resize='none' |
|||
maxlength="120" |
|||
show-word-limit |
|||
:disabled="ifDisableFlag" |
|||
style="height: 60px" > |
|||
</el-input> |
|||
</el-form-item> |
|||
</div></el-col> |
|||
</el-row> |
|||
<el-row :gutter="20" style="margin-top: 60px" v-if="searchData.buNo==='DBE'"> |
|||
<el-col :span="24"><div class="grid-content bg-purple"> |
|||
<el-form-item :label="'备注/Remarks'"> |
|||
<el-input |
|||
type="textarea" |
|||
v-model="dataForm.remark " |
|||
:rows="3" |
|||
resize='none' |
|||
maxlength="120" |
|||
show-word-limit |
|||
:disabled="ifDisableFlag" |
|||
style="height: 60px" > |
|||
</el-input> |
|||
</el-form-item> |
|||
</div></el-col> |
|||
</el-row> |
|||
</el-form> |
|||
|
|||
<el-form label-position="top" style="margin-top:60px; margin-left: 0px;text-align:center"> |
|||
<el-button type="primary" @click="saveData()" v-if="searchData.buNo==='DBE'||searchData.buNo==='SS'" >保存</el-button> |
|||
</el-form> |
|||
|
|||
|
|||
<el-dialog title="编辑信息" :close-on-click-modal="false" v-drag :visible.sync="cutFlag" width="600px"> |
|||
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|||
<el-form-item :label="'次序'"> |
|||
<el-input v-model="cutData.order" type="number" style="width: 130px" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'工段'"> |
|||
<el-input v-model="cutData.station" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'制程状态'"> |
|||
<el-input v-model="cutData.processStep" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'手动/自动覆合机'"> |
|||
<el-input v-model="cutData.machine" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|||
<el-form-item :label="'材料复合类型'"> |
|||
<el-input v-model="cutData.laminationType" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'原材料号'"> |
|||
<el-input v-model="cutData.rmPartNo" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'原材料号2'" v-if="searchData.buNo==='DBE'"> |
|||
<el-input v-model="cutData.rmPartNo2" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'覆合面'"> |
|||
<el-input v-model="cutData.laminationSide" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;" v-if="searchData.buNo=='DBE'"> |
|||
<el-form-item :label="'膜的型号'"> |
|||
<el-input v-model="cutData.filmPartNo" style="width: 130px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'备注'"> |
|||
<el-input v-model="cutData.remarks" style="width: 276px" ></el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|||
<el-button type="primary" @click="cutSave()">保存</el-button> |
|||
<el-button type="primary" @click="cutFlag = false">取消</el-button> |
|||
</el-footer> |
|||
</el-dialog> |
|||
|
|||
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
searchBMLaminationDetail, |
|||
updateBMLaminationDetail, |
|||
searchBMLaminationCut, |
|||
saveBMLaminationCut, |
|||
deleteBMLaminationCut, |
|||
} from "@/api/sampleManagement/technicalSpecificationList.js" |
|||
import Chooselist from '@/views/modules/common/Chooselist' |
|||
export default { |
|||
components: { |
|||
Chooselist |
|||
}, |
|||
data() { |
|||
return { |
|||
searchData: { |
|||
site: '', |
|||
username: this.$store.state.user.name, |
|||
codeNo: '', |
|||
buNo:'', |
|||
}, |
|||
ifDisableFlag:false, |
|||
dataForm:{ |
|||
site: '', |
|||
codeNo:'', |
|||
remark:'', |
|||
action:'', |
|||
|
|||
}, |
|||
cutTable:[], |
|||
cutData:{ |
|||
id:'', |
|||
site: '', |
|||
codeNo:'', |
|||
order:'', |
|||
station:'', |
|||
processStep:'', |
|||
machine:'', |
|||
laminationType:'', |
|||
rmPartNo:'', |
|||
rmPartNo2:'', |
|||
laminationSide:'', |
|||
filmPartNo:'', |
|||
remarks:'', |
|||
updateBy:'', |
|||
updateDate:'', |
|||
}, |
|||
columnList:[], |
|||
columnList1:[ |
|||
{ |
|||
columnProp: "order", |
|||
align: "right", |
|||
columnLabel: "次序", |
|||
columnWidth: 30 |
|||
}, |
|||
{ |
|||
columnProp: "station", |
|||
align: "left", |
|||
columnLabel: "工段", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "processStep", |
|||
align: "left", |
|||
columnLabel: "制程状态", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "machine", |
|||
align: "left", |
|||
columnLabel: "手动/自动覆合机", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "laminationType", |
|||
align: "left", |
|||
columnLabel: "材料复合类型", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "rmPartNo", |
|||
align: "left", |
|||
columnLabel: "原材料号", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "laminationSide", |
|||
align: "left", |
|||
columnLabel: "覆合面", |
|||
columnWidth: 60 |
|||
}, |
|||
], |
|||
columnList2:[ |
|||
{ |
|||
columnProp: "order", |
|||
align: "right", |
|||
columnLabel: "次序", |
|||
columnWidth: 30 |
|||
}, |
|||
{ |
|||
columnProp: "station", |
|||
align: "left", |
|||
columnLabel: "工段", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "processStep", |
|||
align: "left", |
|||
columnLabel: "制程状态", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "machine", |
|||
align: "left", |
|||
columnLabel: "手动/自动覆合机", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "laminationType", |
|||
align: "left", |
|||
columnLabel: "材料复合类型", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "rmPartNo", |
|||
align: "left", |
|||
columnLabel: "原材料号", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "rmPartNo2", |
|||
align: "left", |
|||
columnLabel: "原材料号2", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "filmPartNo", |
|||
align: "left", |
|||
columnLabel: "膜的型号", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "laminationSide", |
|||
align: "left", |
|||
columnLabel: "覆合面", |
|||
columnWidth: 60 |
|||
}, |
|||
{ |
|||
columnProp: "remarks", |
|||
align: "left", |
|||
columnLabel: "备注", |
|||
columnWidth: 60 |
|||
}, |
|||
], |
|||
cutFlag:false, |
|||
} |
|||
}, |
|||
methods: { |
|||
// 获取基础数据列表S |
|||
getBaseList (val, type) { |
|||
this.tagNo = val |
|||
this.tagNo1 = type |
|||
this.$nextTick(() => { |
|||
let strVal = '' |
|||
if (val === 1013) { |
|||
if(type==1) { |
|||
strVal = this.dataForm.partType |
|||
} |
|||
} |
|||
this.$refs.baseList.init(val, strVal) |
|||
}) |
|||
}, |
|||
/* 列表方法的回调 */ |
|||
getBaseData (val) { |
|||
if (this.tagNo === 1013) { |
|||
if(this.tagNo1==1) { |
|||
this.dataForm.partType = val.Base_id |
|||
this.dataForm.partTypeDesc = val.Base_desc |
|||
} |
|||
} |
|||
}, |
|||
//初始化组件的参数 |
|||
init(inData) { |
|||
if(this.dataForm.codeNo!=null&&this.dataForm.codeNo!=''){ |
|||
return false; |
|||
} |
|||
//初始化参数 |
|||
this.searchData = JSON.parse(JSON.stringify(inData)); |
|||
if(this.searchData.buNo==='SS'){ |
|||
this.columnList=JSON.parse(JSON.stringify(this.columnList1)); |
|||
} |
|||
if(this.searchData.buNo==='DBE'){ |
|||
this.columnList=JSON.parse(JSON.stringify(this.columnList2)); |
|||
} |
|||
//刷新表格 |
|||
this.searchTable(); |
|||
this.cutSearch(); |
|||
}, |
|||
searchTable(){ |
|||
searchBMLaminationDetail(this.searchData).then(({data}) => { |
|||
if(data.rows.length>0){ |
|||
this.dataForm = data.rows[0]; |
|||
}else { |
|||
this.dataForm.site=this.searchData.site |
|||
this.dataForm.codeNo=this.searchData.codeNo |
|||
} |
|||
}); |
|||
}, |
|||
saveData(){ |
|||
this.$confirm("是否保存信息?", '保存提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
}).then(() => { |
|||
updateBMLaminationDetail(this.dataForm).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.$message.success( '操作成功') |
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}).catch(() => { |
|||
return |
|||
}) |
|||
}, |
|||
|
|||
newCut(){ |
|||
if(this.searchData.codeNo==''){ |
|||
this.$message.success('数据错误,请关闭页面重试!') |
|||
return false; |
|||
} |
|||
let number=1; |
|||
for (let i = 0; i <this.cutTable.length ; i++) { |
|||
if(number<=this.cutTable[i].order){ |
|||
number=Number(this.cutTable[i].order)+1 |
|||
} |
|||
} |
|||
this.cutData={ |
|||
id:0, |
|||
site: this.searchData.site, |
|||
codeNo:this.searchData.codeNo, |
|||
order:number, |
|||
station:'', |
|||
processStep:'', |
|||
machine:'', |
|||
laminationType:'', |
|||
rmPartNo:'', |
|||
rmPartNo2:'', |
|||
laminationSide:'', |
|||
filmPartNo:'', |
|||
remarks:'', |
|||
updateBy:'', |
|||
updateDate:'', |
|||
} |
|||
this.cutFlag=true; |
|||
}, |
|||
updateCut(row){ |
|||
this.cutData=JSON.parse(JSON.stringify(row)) |
|||
this.cutFlag=true; |
|||
}, |
|||
|
|||
cutSearch(){ |
|||
searchBMLaminationCut(this.searchData).then(({data}) => { |
|||
this.cutTable = data.rows |
|||
}); |
|||
}, |
|||
cutSave(){ |
|||
this.$confirm("是否保存信息?", '保存提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
}).then(() => { |
|||
saveBMLaminationCut(this.cutData).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.cutSearch(); |
|||
this.cutFlag=false |
|||
this.$message.success( '操作成功') |
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}).catch(() => { |
|||
|
|||
}) |
|||
}, |
|||
deleteCut(row){ |
|||
this.$confirm(`是否删除这条信息?`, '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
deleteBMLaminationCut(row).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.cutSearch(); |
|||
this.$message({ |
|||
message: '操作成功', |
|||
type: 'success', |
|||
duration: 1500, |
|||
onClose: () => {} |
|||
}) |
|||
} else { |
|||
this.$alert(data.msg, '错误', { |
|||
confirmButtonText: '确定' |
|||
}) |
|||
} |
|||
}) |
|||
}).catch(() => { |
|||
}) |
|||
}, |
|||
|
|||
|
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue