4 changed files with 392 additions and 3 deletions
-
3src/api/sampleManagement/technicalSpecificationList.js
-
378src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_bom.vue
-
2src/views/modules/sampleManagement/technicalSpecificationDetail/com_bm_customerInformation.vue
-
12src/views/modules/sampleManagement/technicalSpecificationDetail/technicalSpecificationDetail.vue
@ -0,0 +1,378 @@ |
|||
<template> |
|||
<div class="mod-config"> |
|||
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;" v-if="searchData.buNo==='Flexo'||searchData.buNo==='DBE'"> |
|||
<el-form-item > |
|||
<el-button type="primary" @click="searchData()" >刷新</el-button> |
|||
<el-button type="primary" @click="newData()" v-if="!ifDisableFlag">新增</el-button> |
|||
</el-form-item> |
|||
|
|||
<el-table |
|||
:height="height" |
|||
:data="tableData" |
|||
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="updateData(scope.row)">编辑</a> |
|||
<a type="text" size="small" @click="deleteData(scope.row)">删除</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="erpPartNo" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="IFS料号"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="familyName" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="材料分类"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="partDesc" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="120" |
|||
label="材料名称"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="quantity" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="数量"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="spec" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="120" |
|||
label="UL产品型号"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="remark" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="180" |
|||
label="Remark"> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
|
|||
<el-dialog title="BOM" :close-on-click-modal="false" v-drag :visible.sync="bomFlag" width="500px"> |
|||
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|||
<el-form-item > |
|||
<span slot="label" style="" @click="erpPartModel()"><a herf="#">800料号</a></span> |
|||
<el-input v-model="dataForm.erpPartNo" :disabled="dataForm.addId==1" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'物料分类'"> |
|||
<el-input v-model="dataForm.familyName" disabled ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'物料名称'" > |
|||
<el-input v-model="dataForm.partDesc" disabled ></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="dataForm.quantity" :disabled="ifDisableFlag" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'产品规格'"> |
|||
<el-input v-model="dataForm.spec" disabled style="width:294px"></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="'Remark'"> |
|||
<el-input |
|||
type="textarea" |
|||
v-model="dataForm.remark " |
|||
:rows="3" |
|||
resize='none' |
|||
show-word-limit |
|||
:disabled="ifDisableFlag" |
|||
style="width:448px;height: 60px" > |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<el-footer style="height:40px;margin-top: 60px;text-align:center"> |
|||
<el-button type="primary" @click="bomSave()">保存</el-button> |
|||
<el-button type="primary" @click="bomFlag = false">取消</el-button> |
|||
</el-footer> |
|||
</el-dialog> |
|||
|
|||
<el-dialog title="800物料清单" :close-on-click-modal="false" v-drag :visible.sync="partModelFlag" width="500px"> |
|||
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|||
<el-form-item :label="'800料号'"> |
|||
<el-input v-model="partSearchData.erpPartNo" style="width:100px" ></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'物料分类'"> |
|||
<el-input v-model="partSearchData.familyId" style="width:100px" ></el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="'物料名称'" > |
|||
<el-input v-model="partSearchData.partDesc" style="width:150px" ></el-input> |
|||
<el-button type="primary" @click="searchPartData()">查询</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
<el-table |
|||
:data="partList" |
|||
border |
|||
:height="300" |
|||
@row-dblclick="choosePart" |
|||
v-loading="false" |
|||
style="width: 100%;"> |
|||
<el-table-column |
|||
prop="erpPartNo" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="IFS料号"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="familyName" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="60" |
|||
label="材料分类"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="partDesc" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="120" |
|||
label="材料名称"> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="spec" |
|||
header-align="center" |
|||
align="left" |
|||
min-width="120" |
|||
label="规格型号"> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<span slot="footer" class="dialog-footer"> |
|||
<div style="margin-top: 5px"> |
|||
<el-button @click="partModelFlag = false" type="primary">取消</el-button> |
|||
</div> |
|||
</span> |
|||
</el-dialog> |
|||
|
|||
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
searchBMPackageInfo, |
|||
updateBMPackageInfo, |
|||
searchPartDataForSelect, |
|||
} from "@/api/sampleManagement/technicalSpecificationList.js" |
|||
import Chooselist from '@/views/modules/common/Chooselist' |
|||
export default { |
|||
components: { |
|||
Chooselist |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
partModelFlag:false, |
|||
bomFlag:false, |
|||
height:200, |
|||
searchData: { |
|||
site: '', |
|||
username: this.$store.state.user.name, |
|||
codeNo: '', |
|||
buNo:'', |
|||
}, |
|||
partSearchData:{ |
|||
site:'', |
|||
erpPartNo:'', |
|||
familyId:'', |
|||
partDesc:'', |
|||
}, |
|||
partList:[], |
|||
ifDisableFlag:false, |
|||
dataForm:{ |
|||
addId:'', |
|||
site: '', |
|||
codeNo:'', |
|||
erpPartNo:'', |
|||
familyId: '', |
|||
familyName:'', |
|||
partDesc:'', |
|||
quantity:'', |
|||
spec:'', |
|||
remark:'', |
|||
username:this.$store.state.user.name, |
|||
}, |
|||
dataRole: { |
|||
partTypeDesc: [ |
|||
{ |
|||
required: true, |
|||
message: ' ', |
|||
trigger: 'change' |
|||
} |
|||
], |
|||
partName: [ |
|||
{ |
|||
required: true, |
|||
message: ' ', |
|||
trigger: 'change' |
|||
} |
|||
], |
|||
} |
|||
} |
|||
}, |
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 100 |
|||
}) |
|||
}, |
|||
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 |
|||
} |
|||
} |
|||
}, |
|||
searchPartData(){ |
|||
searchPartDataForSelect(this.partSearchData).then(({data}) => { |
|||
this.partList = data.rows; |
|||
|
|||
}); |
|||
}, |
|||
newData(){ |
|||
this.dataForm={ |
|||
addId:0, |
|||
site: this.searchData.site, |
|||
codeNo:this.searchData.codeNo, |
|||
erpPartNo:'', |
|||
familyId: '', |
|||
familyName:'', |
|||
partDesc:'', |
|||
quantity:'', |
|||
spec:'', |
|||
remark:'', |
|||
username:this.$store.state.user.name, |
|||
} |
|||
this.bomFlag=true; |
|||
}, |
|||
updateData(row){ |
|||
this.dataForm={ |
|||
addId:1, |
|||
site: row.site, |
|||
codeNo:row.codeNo, |
|||
erpPartNo:row.erpPartNo, |
|||
familyId: row.familyId, |
|||
familyName:row.familyName, |
|||
partDesc:row.partDesc, |
|||
quantity:row.quantity, |
|||
spec:row.spec, |
|||
remark:row.remark, |
|||
username:this.$store.state.user.name, |
|||
} |
|||
this.bomFlag=true; |
|||
}, |
|||
bomSave(){ |
|||
this.$confirm("是否保存信息?", '保存提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
}).then(() => { |
|||
saveBMBom(this.dataForm).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.$message.success( '操作成功') |
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}).catch(() => { |
|||
return |
|||
}) |
|||
}, |
|||
erpPartModel(){ |
|||
if(this.dataForm.addId==1){ |
|||
return false |
|||
} |
|||
this.partSearchData={ |
|||
site:this.searchData.site, |
|||
erpPartNo:'', |
|||
familyId:'', |
|||
partDesc:'', |
|||
} |
|||
this.searchPartData(); |
|||
this.partModelFlag=true; |
|||
}, |
|||
choosePart(row){ |
|||
this.dataForm.erpPartNo=row.erpPartNo |
|||
this.dataForm.familyId=row.familyId |
|||
this.dataForm.familyName=row.familyName |
|||
this.dataForm.partDesc=row.partDesc |
|||
this.dataForm.spec=row.spec |
|||
this.partModelFlag=false; |
|||
}, |
|||
//初始化组件的参数 |
|||
init(inData) { |
|||
if(this.dataForm.codeNo!=null&&this.dataForm.codeNo!=''){ |
|||
return false; |
|||
} |
|||
//初始化参数 |
|||
this.searchData = JSON.parse(JSON.stringify(inData)); |
|||
//刷新表格 |
|||
this.searchTable(); |
|||
|
|||
}, |
|||
searchTable(){ |
|||
searchBMPackageInfo(this.searchData).then(({data}) => { |
|||
this.dataForm = data.rows[0]; |
|||
|
|||
}); |
|||
}, |
|||
saveData(){ |
|||
this.$confirm("是否保存信息?", '保存提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
}).then(() => { |
|||
updateBMPackageInfo(this.dataForm).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.$message.success( '操作成功') |
|||
} else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}) |
|||
}).catch(() => { |
|||
return |
|||
}) |
|||
}, |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue