|
|
|
@ -177,21 +177,34 @@ |
|
|
|
<el-input v-model="modalData.umId2" @blur="umIdBlur(510)" style="width: 128px"></el-input> |
|
|
|
<el-input v-model="modalData.umName" disabled style="width: 330px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item v-if="modalData.partType2 === 'Purchased (raw)'" prop="familyID"> |
|
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(214)"><a herf="#">物料分类</a></span> |
|
|
|
<el-input v-model="modalData.familyID" @blur="partFamilyBlur(214)" style="width: 128px"></el-input> |
|
|
|
<el-input v-model="modalData.familyName" disabled style="width: 330px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-else> |
|
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(214)"><a herf="#">物料分类</a></span> |
|
|
|
<el-input v-model="modalData.familyID" @blur="partFamilyBlur(214)" style="width: 128px"></el-input> |
|
|
|
<el-input v-model="modalData.familyName" disabled style="width: 330px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;"> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;"> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item v-if="modalData.partType2 === 'Purchased (raw)'"> |
|
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(211)"><a herf="#">商品组1</a></span> |
|
|
|
<el-input v-model="modalData.productGroupId1" @blur="productGroupId1Blur(211)" style="width: 128px"></el-input> |
|
|
|
<el-input v-model="modalData.productGroupName1" disabled style="width: 330px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item v-else prop="productGroupId1"> |
|
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(211)"><a herf="#">商品组1</a></span> |
|
|
|
<el-input v-model="modalData.productGroupId1" @blur="productGroupId1Blur(211)" style="width: 128px"></el-input> |
|
|
|
<el-input v-model="modalData.productGroupName1" disabled style="width: 330px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="modalData.partType2 === 'Purchased (raw)'"> |
|
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(212)"><a herf="#">商品组2</a></span> |
|
|
|
<el-input v-model="modalData.productGroupId2" @blur="productGroupId2Blur(212)" style="width: 128px"></el-input> |
|
|
|
<el-input v-model="modalData.productGroupName2" disabled style="width: 330px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-else prop="productGroupId2"> |
|
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(212)"><a herf="#">商品组2</a></span> |
|
|
|
<el-input v-model="modalData.productGroupId2" @blur="productGroupId2Blur(212)" style="width: 128px"></el-input> |
|
|
|
<el-input v-model="modalData.productGroupName2" disabled style="width: 330px"></el-input> |
|
|
|
@ -203,7 +216,7 @@ |
|
|
|
<el-input v-model="modalData.productGroupId3" @blur="productGroupId3Blur(213)" style="width: 128px"></el-input> |
|
|
|
<el-input v-model="modalData.productGroupName3" disabled style="width: 330px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item prop="codeNo"> |
|
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(219)"><a herf="#">属性模板</a></span> |
|
|
|
<el-input v-model="modalData.codeNo" @blur="modelBlur(219)" style="width: 128px"></el-input> |
|
|
|
<el-input v-model="modalData.codeDesc" disabled style="width: 330px"></el-input> |
|
|
|
@ -904,47 +917,71 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- copyPart --> |
|
|
|
<el-dialog title="Copy Part" :close-on-click-modal="false" v-drag :visible.sync="copyPartModelFlag" width="500px"> |
|
|
|
<fieldset style="width: 474px"> |
|
|
|
<el-dialog title="Copy Part" :close-on-click-modal="false" v-drag :visible.sync="copyPartModelFlag" width="510px"> |
|
|
|
<fieldset style="width: 486px"> |
|
|
|
<legend>Part No To Copy</legend> |
|
|
|
<el-form :inline="true" style="margin-left: 7px"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px"> |
|
|
|
<el-form-item label="From Part"> |
|
|
|
<el-input v-model="modalData.partNo" readonly style="width: 140px"></el-input> |
|
|
|
<el-input v-model="modalData.partDesc" readonly style="width: 287px"></el-input> |
|
|
|
<el-input v-model="modalData.partNo" disabled style="width: 120px"></el-input> |
|
|
|
<el-input v-model="modalData.partDesc" disabled style="width: 205px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="From Site And BU"> |
|
|
|
<el-select v-model="modalData.bu" disabled style="width: 100px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in userBuList" |
|
|
|
:key = "i.buNo" |
|
|
|
:label = "i.buDesc" |
|
|
|
:value = "i.buNo"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px"> |
|
|
|
<el-form-item label="To Part"> |
|
|
|
<el-input v-model="copyPartData.partNo" style="width: 140px"></el-input> |
|
|
|
<el-input v-model="copyPartData.partDesc" style="width: 287px"></el-input> |
|
|
|
<el-input v-model="copyPartData.partDesc" style="width: 330px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="To Site And BU"> |
|
|
|
<el-select v-model="copyPartData.bu" placeholder="请选择" style="width: 100px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in userBuList" |
|
|
|
:key = "i.buNo" |
|
|
|
:label = "i.buDesc" |
|
|
|
:value = "i.buNo"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</fieldset> |
|
|
|
<fieldset style="width: 474px"> |
|
|
|
<fieldset style="width: 486px"> |
|
|
|
<legend>Select Part Information to Copy</legend> |
|
|
|
<el-form :inline="true" style="margin-left: 7px"> |
|
|
|
<el-form :inline="true"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-checkbox v-model="copyPartData.copyGeneral" true-label="Y">主信息</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-checkbox v-model="copyPartData.copyCharacteristic" true-label="Y">物料属性</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-checkbox v-model="copyPartData.copyGeneral" true-label="Y">General</el-checkbox> |
|
|
|
<el-checkbox v-model="copyPartData.copyAgent" true-label="Y">代理商</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-checkbox v-model="copyPartData.copyManufacturing" true-label="Y">供应商</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-checkbox v-model="copyPartData.copyDefaultLocation" true-label="Y">默认库位</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item label=" ">--> |
|
|
|
<!-- <el-checkbox v-model="copyPartData.copyCosts" true-label="Y">Costs</el-checkbox>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label=" ">--> |
|
|
|
<!-- <el-checkbox v-model="copyPartData.copyPlanningData" true-label="Y">Planning Data</el-checkbox>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
</el-form> |
|
|
|
<!-- <el-form :inline="true" style="margin-left: 7px">--> |
|
|
|
<!-- <el-form-item label=" ">--> |
|
|
|
<!-- <el-checkbox v-model="copyPartData.copyManufacturing" true-label="Y">Manufacturing</el-checkbox>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label=" ">--> |
|
|
|
<!-- <el-checkbox v-model="copyPartData.copyDefaultLocation" true-label="Y">Default Location</el-checkbox>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label=" ">--> |
|
|
|
<!-- <el-checkbox v-model="copyPartData.copyRevision" true-label="Y">Revision</el-checkbox>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-form>--> |
|
|
|
</fieldset> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="copyPart">保存</el-button> |
|
|
|
<el-button type="primary" :loading="copyLoading" @click="copyPart">保存</el-button> |
|
|
|
<el-button type="primary" @click="copyPartModelFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
@ -1080,6 +1117,7 @@ |
|
|
|
}, |
|
|
|
// 其它 |
|
|
|
loading: false, |
|
|
|
copyLoading: false, |
|
|
|
// 初始页签 |
|
|
|
activeTable: 'part_item', |
|
|
|
inventoryPartTable: 'General', |
|
|
|
@ -1142,14 +1180,16 @@ |
|
|
|
}, |
|
|
|
copyPartData: { |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
partNo: '', |
|
|
|
partDesc: '', |
|
|
|
partType2: '', |
|
|
|
active: '', |
|
|
|
copyGeneral: 'Y', |
|
|
|
copyCosts: '', |
|
|
|
copyPlanningData: '', |
|
|
|
copyAgent: '', |
|
|
|
copyCharacteristic: '', |
|
|
|
copyManufacturing: '', |
|
|
|
copyDefaultLocation: '', |
|
|
|
copyRevision: '', |
|
|
|
previousVersion: {}, |
|
|
|
createBy: '' |
|
|
|
}, |
|
|
|
@ -2131,13 +2171,6 @@ |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
], |
|
|
|
partNo: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
], |
|
|
|
partDesc: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
@ -2159,13 +2192,6 @@ |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
], |
|
|
|
manufacturerName: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
], |
|
|
|
active: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
@ -2173,28 +2199,28 @@ |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
], |
|
|
|
agentName: [ |
|
|
|
partType2: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
], |
|
|
|
partType2: [ |
|
|
|
familyID: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
], |
|
|
|
productGroupId4: [ |
|
|
|
productGroupId1: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: ['blur','change'] |
|
|
|
} |
|
|
|
], |
|
|
|
lotTrackingCode: [ |
|
|
|
productGroupId2: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
@ -3168,11 +3194,31 @@ |
|
|
|
this.$message.warning('请选择BU!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.active === '' || this.modalData.active == null) { |
|
|
|
this.$message.warning('请选择是否在用!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.partType2 === '' || this.modalData.partType2 == null) { |
|
|
|
this.$message.warning('请选择零件类型!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.umId2 === '' || this.modalData.umId2 == null) { |
|
|
|
this.$message.warning('请选择计量单位!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.tblBaseFlag === 'Y' && this.modalData.codeNo === '') { |
|
|
|
if (this.modalData.partType2 === 'Purchased (raw)' && (this.modalData.familyID === '' || this.modalData.familyID == null)) { |
|
|
|
this.$message.warning('请选择物料分类!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.partType2 !== 'Purchased (raw)' && (this.modalData.productGroupId1 === '' || this.modalData.productGroupId1 == null)) { |
|
|
|
this.$message.warning('请选择商品组1!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.partType2 !== 'Purchased (raw)' && (this.modalData.productGroupId2 === '' || this.modalData.productGroupId2 == null)) { |
|
|
|
this.$message.warning('请选择商品组2!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.modalData.codeNo === '' || this.modalData.codeNo == null) { |
|
|
|
this.$message.warning('请选择属性模板!') |
|
|
|
return |
|
|
|
} |
|
|
|
@ -3252,16 +3298,17 @@ |
|
|
|
// 复制物料的模态框 |
|
|
|
toCopyPartModal () { |
|
|
|
this.copyPartData = { |
|
|
|
site: this.modalData.site, |
|
|
|
buNo: this.modalData.buNo, |
|
|
|
partNo: this.modalData.partNo, |
|
|
|
bu: this.modalData.site + '_' + this.modalData.buNo, |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
partNo: '', |
|
|
|
partDesc: this.modalData.partDesc, |
|
|
|
active: 'Y', |
|
|
|
copyGeneral: 'Y', |
|
|
|
copyCosts: '', |
|
|
|
copyPlanningData: '', |
|
|
|
copyAgent: '', |
|
|
|
copyManufacturing: '', |
|
|
|
copyDefaultLocation: '', |
|
|
|
copyRevision: '', |
|
|
|
copyCharacteristic: '', |
|
|
|
previousVersion: this.modalData, |
|
|
|
createBy: this.$store.state.user.name |
|
|
|
} |
|
|
|
@ -3270,22 +3317,31 @@ |
|
|
|
|
|
|
|
// 复制物料的方法 |
|
|
|
copyPart () { |
|
|
|
if (this.copyPartData.partNo === '' || this.copyPartData.partNo == null) { |
|
|
|
this.$message.warning('请输入物料编码!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.copyPartData.partDesc === '' || this.copyPartData.partDesc == null) { |
|
|
|
this.$message.warning('请输入物料名称!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.copyPartData.copyGeneral === '' || this.copyPartData.copyGeneral == null) { |
|
|
|
this.$message.warning('General信息必选!') |
|
|
|
this.$message.warning('主信息必选!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.copyLoading = true |
|
|
|
copyPart(this.copyPartData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.searchData = { |
|
|
|
site: '', |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
buNo: '', |
|
|
|
partNo: data.partNo, |
|
|
|
startDate: '', |
|
|
|
endDate: '', |
|
|
|
partDesc: '', |
|
|
|
page: 1, |
|
|
|
limit: 10 |
|
|
|
} |
|
|
|
this.getDataList() |
|
|
|
this.copyPartModelFlag = false |
|
|
|
this.modalFlag = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
@ -3297,6 +3353,9 @@ |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
this.copyLoading = false |
|
|
|
}).catch(()=>{ |
|
|
|
this.copyLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|