Browse Source

Merge remote-tracking branch 'origin/master'

java8
qiezi 1 year ago
parent
commit
292ec19b7b
  1. 2
      src/api/part/partInformation.js
  2. 53
      src/views/modules/part/partInformation.vue

2
src/api/part/partInformation.js

@ -199,3 +199,5 @@ export const handleQueryPart = (data) => createAPI('/part/partInformation','post
export const handleQueryPartByPage = (data) => createAPI(`/part/partInformation/${data.no}/${data.size}`,'post',data) export const handleQueryPartByPage = (data) => createAPI(`/part/partInformation/${data.no}/${data.size}`,'post',data)
export const getPreviousPartNo = data => createAPI(`/part/partInformation/getPreviousPartNo`,'post',data)

53
src/views/modules/part/partInformation.vue

@ -139,7 +139,7 @@
<el-input v-model="modalData.spec" style="width: 477px"></el-input> <el-input v-model="modalData.spec" style="width: 477px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="BU" prop="bu"> <el-form-item label="BU" prop="bu">
<el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 100px">
<el-select v-model="modalData.bu" placeholder="请选择" @change="getPreviousPartNo" :disabled="modalDisableFlag" style="width: 90px">
<el-option <el-option
v-for = "i in userBuList" v-for = "i in userBuList"
:key = "i.buNo" :key = "i.buNo"
@ -149,13 +149,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="active" label="是否在用"> <el-form-item prop="active" label="是否在用">
<el-select v-model="modalData.active" style="width: 100px">
<el-select v-model="modalData.active" style="width: 80px">
<el-option label="是" value="Y"></el-option> <el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option> <el-option label="否" value="N"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="partType2" label="零件类型"> <el-form-item prop="partType2" label="零件类型">
<el-select v-model="modalData.partType2" style="width: 160px">
<el-select v-model="modalData.partType2" style="width: 120px">
<el-option label="成品" value="Manufactured"></el-option> <el-option label="成品" value="Manufactured"></el-option>
<el-option label="半成品" value="Manufactured Recipe"></el-option> <el-option label="半成品" value="Manufactured Recipe"></el-option>
<el-option label="原材料" value="Purchased (raw)"></el-option> <el-option label="原材料" value="Purchased (raw)"></el-option>
@ -164,6 +164,9 @@
<el-form-item v-if="modalData.flag === '2'" :label="' '"> <el-form-item v-if="modalData.flag === '2'" :label="' '">
<el-button type="primary" @click="toCopyPartModal">Copy</el-button> <el-button type="primary" @click="toCopyPartModal">Copy</el-button>
</el-form-item> </el-form-item>
<el-form-item v-if="modalData.flag === '1'" style="margin-top: 23px">
<el-checkbox v-model="modalData.tblBaseFlag" true-label="Y">复制属性({{previousPartNo}})</el-checkbox>
</el-form-item>
</el-form> </el-form>
<el-tabs v-model="inventoryPartTable" style="width: 100%;height: 305px;" type="border-card" @tab-click="inventoryPartClick"> <el-tabs v-model="inventoryPartTable" style="width: 100%;height: 305px;" type="border-card" @tab-click="inventoryPartClick">
<el-tab-pane label="General" name="General"> <el-tab-pane label="General" name="General">
@ -988,6 +991,7 @@
copyPart, // copyPart, //
getProjectPartNo, // getProjectPartNo, //
verifyData, // verifyData, //
getPreviousPartNo, //
} from '@/api/part/partInformation.js' } from '@/api/part/partInformation.js'
import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js' import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js'
import {deleteObjectFile} from '@/api/eam/eam.js' import {deleteObjectFile} from '@/api/eam/eam.js'
@ -1105,7 +1109,8 @@
partDesceEn: '', partDesceEn: '',
remark: '', remark: '',
codeNo: '', codeNo: '',
codeDesc: ''
codeDesc: '',
tblBaseFlag: ''
}, },
itemData: { itemData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
@ -2224,6 +2229,7 @@
attributeDialog: true, attributeDialog: true,
uploadDialog: false, uploadDialog: false,
menuId: this.$route.meta.menuId, menuId: this.$route.meta.menuId,
previousPartNo: ''
} }
}, },
@ -2676,19 +2682,34 @@
partDesceEn: '', partDesceEn: '',
remark: '', remark: '',
codeNo: '', codeNo: '',
codeDesc: ''
codeDesc: '',
tblBaseFlag: '',
createBy: this.$store.state.user.name
} }
this.inventoryPartTable = 'General' this.inventoryPartTable = 'General'
this.modalDisableFlag = false this.modalDisableFlag = false
this.modalFlag = true this.modalFlag = true
// getProjectPartNo(this.searchData).then(({data}) => {
// if (data && data.code === 0) {
//
// } else {
// this.$message.error(data.msg)
// }
// })
this.getPreviousPartNo()
}, },
//
getPreviousPartNo () {
let tempData = {
site: this.modalData.bu.split('_')[0],
type: 'thePreviousPartItem',
thirdType: this.modalData.bu.split('_')[1],
secondType: this.$store.state.user.name
}
getPreviousPartNo(tempData).then(({data}) => {
if (data && data.code === 0) {
this.previousPartNo = data.previousPartNo
} else {
this.previousPartNo = ''
}
})
},
/** /**
* 物料信息编辑模态框 * 物料信息编辑模态框
* @param row * @param row
@ -2719,7 +2740,9 @@
partDesceEn: row.partDesceEn, partDesceEn: row.partDesceEn,
remark: row.remark, remark: row.remark,
codeNo: row.codeNo, codeNo: row.codeNo,
codeDesc: row.codeDesc
codeDesc: row.codeDesc,
tblBaseFlag: '',
createBy: ''
} }
this.inventoryPartTable = 'General' this.inventoryPartTable = 'General'
this.modalDisableFlag = true this.modalDisableFlag = true
@ -3141,6 +3164,10 @@
this.$message.warning('请选择计量单位!') this.$message.warning('请选择计量单位!')
return return
} }
if (this.modalData.tblBaseFlag === 'Y' && this.modalData.codeNo === '') {
this.$message.warning('请选择属性模板!')
return
}
if (this.modalData.flag === '1') { if (this.modalData.flag === '1') {
partInformationSave(this.modalData).then(({data}) => { partInformationSave(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {

Loading…
Cancel
Save