Browse Source

Merge remote-tracking branch 'origin/master'

master
qiezi 1 year ago
parent
commit
21e9c9a2a1
  1. 2
      src/api/chooselist/chooselist.js
  2. 142
      src/views/modules/changeManagement/changeRecord.vue
  3. 151
      src/views/modules/changeManagement/changeRequest.vue
  4. 49
      src/views/modules/customer/customerInformationManagement.vue
  5. 45
      src/views/modules/part/bomManagement.vue
  6. 59
      src/views/modules/part/partCatalogInformation.vue
  7. 311
      src/views/modules/part/partInformation.vue
  8. 43
      src/views/modules/part/routingManagement.vue
  9. 57
      src/views/modules/processManagement/processBindingInfo.vue

2
src/api/chooselist/chooselist.js

@ -7,3 +7,5 @@ export const getChooselist = data => createAPI(`/chooselist/getChooselist/${data
export const getChooselistData = data => createAPI(`/chooselist/getChooselistData`,'post',data)
export const chooseList = data => createAPI(`/chooselist/getChooseList`,'post',data)
export const verifyData = data => createAPI(`/chooselist/verifyData`,'post',data)

142
src/views/modules/changeManagement/changeRecord.vue

@ -83,7 +83,7 @@
<el-form-item prop="applicantId" :rules="rules.applicantId">
<span v-if="changeRequestFlag('applicantId') === 'N'" slot="label">申请人</span>
<span v-else style="cursor: pointer" slot="label" @click="getBaseList(103, 1)"><a herf="#">申请人</a></span>
<el-input v-model="modalData.applicantId" :disabled="changeRequestFlag('applicantId') === 'N'" style="width: 120px"></el-input>
<el-input v-model="modalData.applicantId" @blur="applicantBlur(103)" :disabled="changeRequestFlag('applicantId') === 'N'" style="width: 120px"></el-input>
<el-input v-model="modalData.applicantName" disabled style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="申请部门">
@ -126,7 +126,7 @@
<el-form-item prop="tpEngineerId" :rules="rules.tpEngineerId">
<span v-if="changeRequestFlag('tpEngineerId') === 'N'" slot="label">审批人员</span>
<span v-else style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a herf="#">审批人员</a></span>
<el-input v-model="modalData.tpEngineerId" clearable :disabled="changeRequestFlag('tpEngineerId') === 'N'" style="width: 120px"></el-input>
<el-input v-model="modalData.tpEngineerId" @blur="tpEngineerBlur(2005)" :disabled="changeRequestFlag('tpEngineerId') === 'N'" style="width: 120px"></el-input>
<el-input v-model="modalData.tpEngineerName" disabled style="width: 300px"></el-input>
</el-form-item>
</el-form>
@ -151,7 +151,7 @@
<el-form-item label=" " :required="modalData.dfIsProduct === 'I'" prop="industrialEngineerId" :show-message="false">
<span v-if="changeRequestFlag('industrialEngineerId') === 'N'" slot="label">I/E</span>
<span v-else style="cursor: pointer" slot="label" @click="getBaseList(2006)"><a herf="#">I/E</a></span>
<el-input v-model="modalData.industrialEngineerId" clearable :disabled="changeRequestFlag('industrialEngineerId') === 'N'" style="width: 120px"></el-input>
<el-input v-model="modalData.industrialEngineerId" @blur="industrialEngineerBlur(2006)" :disabled="changeRequestFlag('industrialEngineerId') === 'N'" style="width: 120px"></el-input>
<el-input v-model="modalData.industrialEngineerName" disabled style="width: 300px"></el-input>
</el-form-item>
<!-- <el-form-item label="制造成本是否变更" prop="manufacturingCostIsChange" :rules="rules.manufacturingCostIsChange">-->
@ -162,13 +162,13 @@
<el-form-item label=" ">
<span v-if="changeRequestFlag('cqcOperatorId') === 'N'" slot="label">CQC</span>
<span v-else style="cursor: pointer" slot="label" @click="getBaseList(2007)"><a herf="#">CQC</a></span>
<el-input v-model="modalData.cqcOperatorId" clearable :disabled="changeRequestFlag('cqcOperatorId') === 'N'" style="width: 120px"></el-input>
<el-input v-model="modalData.cqcOperatorId" @blur="cqcOperatorBlur(2007)" :disabled="changeRequestFlag('cqcOperatorId') === 'N'" style="width: 120px"></el-input>
<el-input v-model="modalData.cqcOperatorName" disabled style="width: 297px"></el-input>
</el-form-item>
<el-form-item label=" ">
<span v-if="changeRequestFlag('faiOperatorId') === 'N'" slot="label">FAI</span>
<span v-else style="cursor: pointer" slot="label" @click="getBaseList(2008)"><a herf="#">FAI</a></span>
<el-input v-model="modalData.faiOperatorId" clearable :disabled="changeRequestFlag('faiOperatorId') === 'N'" style="width: 120px"></el-input>
<el-input v-model="modalData.faiOperatorId" @blur="faiOperatorBlur(2008)" :disabled="changeRequestFlag('faiOperatorId') === 'N'" style="width: 120px"></el-input>
<el-input v-model="modalData.faiOperatorName" disabled style="width: 300px"></el-input>
</el-form-item>
</el-form>
@ -1000,10 +1000,11 @@
submitChange2, //
} from '@/api/changeManagement/changeManagement.js'
import ChooseList from '@/views/modules/common/Chooselist'
import changeUploadFile from "../base/upload_file.vue";
import {verifyData} from "@/api/chooselist/chooselist.js"
import changeUploadFile from "../base/upload_file.vue"
import {downLoadQuotationFile} from '@/api/quotation/quotationInformation.js'
import DictDataSelect from "../sys/dict-data-select.vue";
import UploadFileList from "../common/uploadFileList.vue";
import DictDataSelect from "../sys/dict-data-select.vue"
import UploadFileList from "../common/uploadFileList.vue"
export default {
components: {
UploadFileList,
@ -3592,6 +3593,131 @@
}
},
//
applicantBlur (tagNo) {
if (this.modalData.applicantId != null && this.modalData.applicantId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and username = '" + this.modalData.applicantId + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.applicantId = data.baseListData[0].username
this.modalData.applicantName = data.baseListData[0].user_display
this.getDepartmentByUserName()
} else {
this.$message.warning('该申请人员不存在!')
this.modalData.applicantName = ''
this.modalData.applicationDepartmentId = ''
this.modalData.applicationDepartmentName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.applicantName = ''
this.modalData.applicationDepartmentId = ''
this.modalData.applicationDepartmentName = ''
}
})
}
},
//
tpEngineerBlur (tagNo) {
if (this.modalData.tpEngineerId != null && this.modalData.tpEngineerId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and a.username = '" + this.modalData.tpEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.tpEngineerId = data.baseListData[0].username
this.modalData.tpEngineerName = data.baseListData[0].user_display
} else {
this.$message.warning('该审批人员不存在!')
this.modalData.tpEngineerName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.tpEngineerName = ''
}
})
}
},
// I/E
industrialEngineerBlur (tagNo) {
if (this.modalData.industrialEngineerId != null && this.modalData.industrialEngineerId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and a.username = '" + this.modalData.industrialEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.industrialEngineerId = data.baseListData[0].username
this.modalData.industrialEngineerName = data.baseListData[0].user_display
} else {
this.$message.warning('该I/E人员不存在!')
this.modalData.industrialEngineerName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.industrialEngineerName = ''
}
})
}
},
// CQC
cqcOperatorBlur (tagNo) {
if (this.modalData.cqcOperatorId != null && this.modalData.cqcOperatorId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and a.username = '" + this.modalData.cqcOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.cqcOperatorId = data.baseListData[0].username
this.modalData.cqcOperatorName = data.baseListData[0].user_display
} else {
this.$message.warning('该CQC人员不存在!')
this.modalData.cqcOperatorName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.cqcOperatorName = ''
}
})
}
},
// FAI
faiOperatorBlur (tagNo) {
if (this.modalData.faiOperatorId != null && this.modalData.faiOperatorId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and a.username = '" + this.modalData.faiOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.faiOperatorId = data.baseListData[0].username
this.modalData.faiOperatorName = data.baseListData[0].user_display
} else {
this.$message.warning('该FAI人员不存在!')
this.modalData.faiOperatorName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.faiOperatorName = ''
}
})
}
},
// ======== ========
/**
* 导出excel

151
src/views/modules/changeManagement/changeRequest.vue

@ -78,7 +78,6 @@
<!-- 分页插件 -->
<el-pagination
style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
@ -96,7 +95,7 @@
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item prop="applicantId" :rules="rules.applicantId">
<span style="cursor: pointer" slot="label" @click="getBaseList(103, 1)"><a herf="#">申请人</a></span>
<el-input v-model="modalData.applicantId" style="width: 120px"></el-input>
<el-input v-model="modalData.applicantId" @blur="applicantBlur(103)" style="width: 120px"></el-input>
<el-input v-model="modalData.applicantName" disabled style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="申请部门" >
@ -137,7 +136,7 @@
</el-form-item>
<el-form-item prop="tpEngineerId" :rules="rules.tpEngineerId">
<span style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a herf="#">审批人员</a></span>
<el-input v-model="modalData.tpEngineerId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.tpEngineerId" @blur="tpEngineerBlur(2005)" style="width: 120px"></el-input>
<el-input v-model="modalData.tpEngineerName" disabled style="width: 300px"></el-input>
</el-form-item>
</el-form>
@ -160,7 +159,7 @@
</el-form-item>
<el-form-item label=" " prop="industrialEngineerId" :rules="[{required: modalData.dfIsProduct === 'Yes',message: ' ',trigger: ['blur','change']}]">
<span style="cursor: pointer" slot="label" @click="getBaseList(2006)"><a herf="#">I/E</a></span>
<el-input v-model="modalData.industrialEngineerId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.industrialEngineerId" @blur="industrialEngineerBlur(2006)" style="width: 120px"></el-input>
<el-input v-model="modalData.industrialEngineerName" disabled style="width: 300px"></el-input>
</el-form-item>
<!-- <el-form-item label="制造成本是否变更" prop="manufacturingCostIsChange" :rules="rules.manufacturingCostIsChange">-->
@ -170,12 +169,12 @@
<el-form :inline="true" label-position="top" :model="modalData">
<el-form-item label=" ">
<span style="cursor: pointer" slot="label" @click="getBaseList(2007)"><a herf="#">CQC</a></span>
<el-input v-model="modalData.cqcOperatorId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.cqcOperatorId" @blur="cqcOperatorBlur(2007)" style="width: 120px"></el-input>
<el-input v-model="modalData.cqcOperatorName" disabled style="width: 297px"></el-input>
</el-form-item>
<el-form-item label=" ">
<span style="cursor: pointer" slot="label" @click="getBaseList(2008)"><a herf="#">FAI</a></span>
<el-input v-model="modalData.faiOperatorId" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.faiOperatorId" @blur="faiOperatorBlur(2008)" style="width: 120px"></el-input>
<el-input v-model="modalData.faiOperatorName" disabled style="width: 300px"></el-input>
</el-form-item>
</el-form>
@ -811,15 +810,14 @@
getItemList, //
countersignatureSave, //
} from "@/api/changeManagement/changeManagement.js"
import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
import ChooseList from '@/views/modules/common/Chooselist'
import {
uploadFile //
} from '@/api/oss/oss.js'
import {uploadFileList} from "../../../api/test/testInformation";
import {uploadFile} from '@/api/oss/oss.js'
import {uploadFileList} from "../../../api/test/testInformation"
import DictDataSelect from '../sys/dict-data-select.vue'
import changeUploadFile from "../base/upload_file.vue"
import dayjs from "dayjs";
import UploadFileList from "../common/uploadFileList.vue";
import dayjs from "dayjs"
import UploadFileList from "../common/uploadFileList.vue"
export default {
components: {
UploadFileList,
@ -827,7 +825,6 @@
DictDataSelect,
ChooseList
},
watch: {
modalData: {
deep: true,
@ -847,7 +844,6 @@
}
},
},
data() {
return {
uploadDialog: false,
@ -2803,6 +2799,133 @@
}
},
//
applicantBlur (tagNo) {
if (this.modalData.applicantId != null && this.modalData.applicantId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and username = '" + this.modalData.applicantId + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.applicantId = data.baseListData[0].username
this.modalData.applicantName = data.baseListData[0].user_display
this.getDepartmentByUserName()
} else {
this.$message.warning('该申请人员不存在!')
this.modalData.applicantName = ''
this.modalData.applicationDepartmentId = ''
this.modalData.applicationDepartmentName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.applicantName = ''
this.modalData.applicationDepartmentId = ''
this.modalData.applicationDepartmentName = ''
}
})
}
},
//
tpEngineerBlur (tagNo) {
if (this.modalData.tpEngineerId != null && this.modalData.tpEngineerId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and a.username = '" + this.modalData.tpEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.tpEngineerId = data.baseListData[0].username
this.modalData.tpEngineerName = data.baseListData[0].user_display
} else {
this.$message.warning('该审批人员不存在!')
this.modalData.tpEngineerName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.tpEngineerName = ''
}
})
}
},
// I/E
industrialEngineerBlur (tagNo) {
if (this.modalData.industrialEngineerId != null && this.modalData.industrialEngineerId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and a.username = '" + this.modalData.industrialEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.industrialEngineerId = data.baseListData[0].username
this.modalData.industrialEngineerName = data.baseListData[0].user_display
} else {
this.$message.warning('该I/E人员不存在!')
this.modalData.industrialEngineerName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.industrialEngineerName = ''
}
})
}
},
// CQC
cqcOperatorBlur (tagNo) {
if (this.modalData.cqcOperatorId != null && this.modalData.cqcOperatorId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and a.username = '" + this.modalData.cqcOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.cqcOperatorId = data.baseListData[0].username
this.modalData.cqcOperatorName = data.baseListData[0].user_display
} else {
this.$message.warning('该CQC人员不存在!')
this.modalData.cqcOperatorName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.cqcOperatorName = ''
}
})
}
},
// FAI
faiOperatorBlur (tagNo) {
if (this.modalData.faiOperatorId != null && this.modalData.faiOperatorId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and a.username = '" + this.modalData.faiOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.faiOperatorId = data.baseListData[0].username
this.modalData.faiOperatorName = data.baseListData[0].user_display
} else {
this.$message.warning('该FAI人员不存在!')
this.modalData.faiOperatorName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.faiOperatorName = ''
}
})
}
},
// ======== ========
/**
* 导出excel

49
src/views/modules/customer/customerInformationManagement.vue

@ -82,7 +82,7 @@
</el-table>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
@ -149,12 +149,12 @@
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(120)"><a herf="#">客户组1</a></span>
<el-input v-model="modalData.customerGroupId1" clearable @blur="customerGroupBlur" style="width: 124px"></el-input>
<el-input v-model="modalData.customerGroupId1" @blur="customerGroupBlur(120)" style="width: 124px"></el-input>
<el-input v-model="modalData.customerGroupName1" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(121)"><a herf="#">客户组2</a></span>
<el-input v-model="modalData.customerGroupId2" clearable @blur="customerGroupBlur2" style="width: 124px"></el-input>
<el-input v-model="modalData.customerGroupId2" @blur="customerGroupBlur2(121)" style="width: 124px"></el-input>
<el-input v-model="modalData.customerGroupName2" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
@ -724,6 +724,7 @@
saveProjectInfo
} from "@/api/project/project.js"
import Chooselist from '@/views/modules/common/Chooselist'
import {verifyData} from "@/api/chooselist/chooselist.js"
import DictDataSelect from '../sys/dict-data-select.vue'
import saveOrUpdate from '../project/projectInfo/com_projectInfo-add-or-update.vue'
import partUploadFile from '../part/part_upload_file.vue'
@ -2944,30 +2945,48 @@
this.projectInformationSelections = val
},
// ID
customerGroupBlur () {
// 1
customerGroupBlur (tagNo) {
if (this.modalData.customerGroupId1 != null && this.modalData.customerGroupId1 !== '') {
this.modalData.type = '1'
checkCustomerGroup(this.modalData).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and customer_group_id = '" + this.modalData.customerGroupId1 + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
this.modalData.customerGroupId1 = data.rows.customerGroupId
this.modalData.customerGroupName1 = data.rows.customerGroupName
if (data.baseListData.length > 0) {
this.modalData.customerGroupId1 = data.baseListData[0].customer_group_id
this.modalData.customerGroupName1 = data.baseListData[0].customer_group_name
} else {
this.$message.warning('该客户组1不存在!')
this.modalData.customerGroupName1 = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.customerGroupName1 = ''
}
})
}
},
// ID
customerGroupBlur2 () {
// 2
customerGroupBlur2 (tagNo) {
if (this.modalData.customerGroupId2 != null && this.modalData.customerGroupId2 !== '') {
this.modalData.type = '2'
checkCustomerGroup(this.modalData).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and customer_group_id = '" + this.modalData.customerGroupId2 + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
this.modalData.customerGroupId12 = data.rows.customerGroupId
this.modalData.customerGroupName2 = data.rows.customerGroupName
if (data.baseListData.length > 0) {
this.modalData.customerGroupId2 = data.baseListData[0].customer_group_id
this.modalData.customerGroupName2 = data.baseListData[0].customer_group_name
} else {
this.$message.warning('该客户组2不存在!')
this.modalData.customerGroupName2 = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.customerGroupName2 = ''
}
})

45
src/views/modules/part/bomManagement.vue

@ -81,14 +81,14 @@
<selectDiv ref="selectDiv"></selectDiv>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- bom新增/编辑模态框 -->
@ -3231,20 +3231,23 @@ export default {
//
componentPartBlur () {
this.componentPartData.partNo = this.componentData.componentPart
queryPartList(this.componentPartData).then(({data}) => {
if (data && data.code === 0) {
if (data.rows.length === 1) {
this.componentData.componentPartDesc = data.rows[0].partDesc
this.componentData.printUnit = data.rows[0].printUnit
this.componentData.printUnitName = data.rows[0].printUnitName
} else {
this.componentData.componentPartDesc = ''
this.componentData.printUnit = ''
this.componentData.printUnitName = ''
if (this.componentData.componentPart != null && this.componentData.componentPart !== '') {
this.componentPartData.partNo = this.componentData.componentPart
queryPartList(this.componentPartData).then(({data}) => {
if (data && data.code === 0) {
if (data.rows.length === 1) {
this.componentData.componentPartDesc = data.rows[0].partDesc
this.componentData.printUnit = data.rows[0].printUnit
this.componentData.printUnitName = data.rows[0].printUnitName
} else {
this.$message.warning('该子物料不存在!')
this.componentData.componentPartDesc = ''
this.componentData.printUnit = ''
this.componentData.printUnitName = ''
}
}
}
})
})
}
},
/**

59
src/views/modules/part/partCatalogInformation.vue

@ -77,7 +77,7 @@
<selectDiv ref="selectDiv"></selectDiv>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
@ -106,14 +106,14 @@
<!-- </el-form-item>-->
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="umName" :rules="rules.umId">
<el-form-item prop="umId" :rules="rules.umId">
<span style="cursor: pointer" slot="label" @click="getBaseList(1007)"><a herf="#">计量单位</a></span>
<el-input v-model="modalData.umId" style="width: 120px"></el-input>
<el-input v-model="modalData.umId" @blur="umIdBlur(1007)" style="width: 120px"></el-input>
<el-input v-model="modalData.umName" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="codeDesc" :rules="rules.codeDesc">
<el-form-item prop="codeNo" :rules="rules.codeDesc">
<span style="cursor: pointer" slot="label" @click="getBaseList(22)"><a herf="#">属性模板</a></span>
<el-input v-model="modalData.codeNo" style="width: 120px"></el-input>
<el-input v-model="modalData.codeDesc" disabled style="width: 330px"></el-input>
@ -129,7 +129,7 @@
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(109)"><a herf="#">物料分组</a></span>
<el-input v-model="modalData.partMainGroup" style="width: 120px"></el-input>
<el-input v-model="modalData.partMainGroup" @blur="groupIdBlur(109)" style="width: 120px"></el-input>
<el-input v-model="modalData.groupName" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item label="批量规则">
@ -427,6 +427,7 @@
queryMasterPartItem,
toBecomeOfficialMasterPart, //
} from '@/api/part/masterPartInformation.js'
import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
import {getProjectPartNo} from '@/api/part/partInformation.js'
import Chooselist from '@/views/modules/common/Chooselist'
import DictDataSelect from '../sys/dict-data-select.vue'
@ -1695,6 +1696,54 @@
}
},
//
umIdBlur (tagNo) {
if (this.modalData.umId != null && this.modalData.umId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and um_id = '" + this.modalData.umId + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.umId = data.baseListData[0].um_id
this.modalData.umName = data.baseListData[0].um_name
} else {
this.$message.warning('该计量单位不存在!')
this.modalData.umName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.umName = ''
}
})
}
},
//
groupIdBlur (tagNo) {
if (this.modalData.partMainGroup != null && this.modalData.partMainGroup !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and group_id = '" + this.modalData.partMainGroup + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.partMainGroup = data.baseListData[0].group_id
this.modalData.groupName = data.baseListData[0].group_name
} else {
this.$message.warning('该物料分组不存在!')
this.modalData.groupName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.groupName = ''
}
})
}
},
// ======== ========
/**
* 导出excel

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

@ -145,50 +145,50 @@
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(123)"><a herf="#">安全代码 / Safety Code</a></span>
<el-input v-model="modalData.hazardCode" @blur="hazardCodeBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.hazardCode" @blur="hazardCodeBlur(123)" style="width: 128px"></el-input>
<el-input v-model="modalData.hazardDesc" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item prop="productGroupId4" :rules="rules.productGroupId4">
<span style="cursor: pointer" slot="label" @click="getBaseList(113)"><a herf="#">计划人 / Planner</a></span>
<el-input v-model="modalData.productGroupId4" @blur="productGroupId4Blur" style="width: 128px"></el-input>
<el-input v-model="modalData.productGroupId4" @blur="productGroupId4Blur(113)" style="width: 128px"></el-input>
<el-input v-model="modalData.productGroupName4" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(112)"><a herf="#">会计组 / Accounting Group</a></span>
<el-input v-model="modalData.productGroupId3" @blur="productGroupId3Blur" style="width: 128px"></el-input>
<el-input v-model="modalData.productGroupId3" @blur="productGroupId3Blur(112)" style="width: 128px"></el-input>
<el-input v-model="modalData.productGroupName3" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item prop="umName" :rules="rules.umName">
<el-form-item prop="umId" :rules="rules.umId">
<span style="cursor: pointer" slot="label" @click="getBaseList(1007)"><a herf="#">计量单位 / Inventory UoM</a></span>
<el-input v-model="modalData.umId" @blur="umIdBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.umId" @blur="umIdBlur(1007)" style="width: 128px"></el-input>
<el-input v-model="modalData.umName" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(109)"><a herf="#">产品代码 / Product Code</a></span>
<el-input v-model="modalData.groupId" @blur="groupIdBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.groupId" @blur="groupIdBlur(109)" style="width: 128px"></el-input>
<el-input v-model="modalData.groupName" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(110)"><a herf="#">商品组1 / Comm Group 1</a></span>
<el-input v-model="modalData.productGroupId1" @blur="productGroupId1Blur" style="width: 128px"></el-input>
<el-input v-model="modalData.productGroupId1" @blur="productGroupId1Blur(110)" style="width: 128px"></el-input>
<el-input v-model="modalData.productGroupName1" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(108)"><a herf="#">产品大类 / Product Family</a></span>
<el-input v-model="modalData.familyId" @blur="familyIdBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.familyId" @blur="familyIdBlur(108)" 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">
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(111)"><a herf="#">商品组2 / Comm Group 2</a></span>
<el-input v-model="modalData.productGroupId2" @blur="productGroupId2Blur" style="width: 128px"></el-input>
<el-input v-model="modalData.productGroupId2" @blur="productGroupId2Blur(111)" style="width: 128px"></el-input>
<el-input v-model="modalData.productGroupName2" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item label="类型指定 / Type Designation">
@ -198,7 +198,7 @@
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(124)"><a herf="#">资产等级 / Asset Class</a></span>
<el-input v-model="modalData.assetClass" @blur="assetClassBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.assetClass" @blur="assetClassBlur(124)" style="width: 128px"></el-input>
<el-input v-model="modalData.assetClassDesc" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item label="尺寸/材质 / Dimension/Quality">
@ -208,7 +208,7 @@
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(125)"><a herf="#">零件状态 / Part Status</a></span>
<el-input v-model="modalData.partStatus" @blur="partStatusBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.partStatus" @blur="partStatusBlur(125)" style="width: 128px"></el-input>
<el-input v-model="modalData.partStatusDesc" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item label="净重">
@ -223,7 +223,7 @@
<el-form-item>
<span style="cursor: pointer" slot="label" v-if="!modalDisableFlag"><a herf="#">ABC类 / ABC Class</a></span>
<span style="cursor: pointer" slot="label" v-else @click="getBaseList(126)"><a herf="#">ABC类 / ABC Class</a></span>
<el-input v-model="modalData.abcClass" @blur="abcClassBlur" :readonly="!modalDisableFlag" style="width: 128px"></el-input>
<el-input v-model="modalData.abcClass" @blur="abcClassBlur(126)" :readonly="!modalDisableFlag" style="width: 128px"></el-input>
<el-input v-model="modalData.abcClassDesc" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item label="净数量">
@ -237,7 +237,7 @@
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item prop="codeNo" :rules="rules.codeNo">
<span style="cursor: pointer" slot="label" @click="getBaseList(20)"><a herf="#">属性模板</a></span>
<el-input v-model="modalData.codeNo" @blur="codeNoBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.codeNo" style="width: 128px"></el-input>
<el-input v-model="modalData.codeDesc" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item label="频率级别 / Frequency Class">
@ -259,7 +259,7 @@
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(127)"><a herf="#">来源国家 / Country of Origin</a></span>
<el-input v-model="modalData.countryOfOrigin" @blur="countryOfOriginBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.countryOfOrigin" @blur="countryOfOriginBlur(127)" style="width: 128px"></el-input>
<el-input v-model="modalData.countryOfOriginDesc" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
@ -272,7 +272,7 @@
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(128)"><a herf="#">区域代码 / Region Code</a></span>
<el-input v-model="modalData.regionOfOrigin" @blur="regionOfOriginBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.regionOfOrigin" @blur="regionOfOriginBlur(128)" style="width: 128px"></el-input>
<el-input v-model="modalData.regionOfOriginDesc" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
@ -283,7 +283,7 @@
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(129)"><a herf="#">海关统计序号 / Customs Stat No</a></span>
<el-input v-model="modalData.customsStatNo" @blur="customsStatNoBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.customsStatNo" @blur="customsStatNoBlur(129)" style="width: 128px"></el-input>
<el-input v-model="modalData.customsStatDesc" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
@ -321,7 +321,7 @@
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(131)"><a herf="#">零件成本组 / Part Cost Group</a></span>
<el-input v-model="modalData.partCostGroupId" @blur="partCostGroupIdBlur" style="width: 128px"></el-input>
<el-input v-model="modalData.partCostGroupId" @blur="partCostGroupIdBlur(131)" style="width: 128px"></el-input>
<el-input v-model="modalData.partCostGroupDesc" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
@ -360,7 +360,7 @@
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(132)"><a herf="#">计划方法 / Planning Method</a></span>
<el-input v-model="modalData.planningMethod" @blur="planningMethodBlur" style="width: 170px"></el-input>
<el-input v-model="modalData.planningMethod" @blur="planningMethodBlur(132)" style="width: 170px"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-input v-model="modalData.planningMethodDesc" disabled style="width: 510px"></el-input>
@ -794,6 +794,7 @@
width="100"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="previewFile(scope.row)">预览</el-link>
<el-link style="cursor: pointer" @click="downloadFile(scope.row)">下载</el-link>
<el-link style="cursor: pointer" @click="deleteFile(scope.row)">删除</el-link>
</template>
@ -1395,9 +1396,7 @@
deleteQuotationFile, //
downLoadQuotationFile //
} from '@/api/quotation/quotationInformation.js'
import {
getChooselistData
} from "@/api/chooselist/chooselist.js"
import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
import Chooselist from '@/views/modules/common/Chooselist'
import partUploadFile from "./part_upload_file"
import DictDataSelect from '../sys/dict-data-select.vue'
@ -2902,7 +2901,7 @@
trigger: ['blur','change']
}
],
umName: [
umId: [
{
required: true,
message: ' ',
@ -4627,272 +4626,408 @@
},
//
hazardCodeBlur () {
hazardCodeBlur (tagNo) {
if (this.modalData.hazardCode != null && this.modalData.hazardCode !== '') {
getChooselistData({"sqlcode": "Select hazard_code, hazard_desc from plm_safety_code where active = 'Y' and hazard_code = '" + this.modalData.hazardCode + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and hazard_code = '" + this.modalData.hazardCode + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.hazardCode = data.baseListData[0].hazard_code
this.modalData.hazardDesc = data.baseListData[0].hazard_desc
} else {
this.$message.warning('该安全代码不存在!')
this.modalData.hazardDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.hazardDesc = ''
}
})
}
},
//
productGroupId4Blur () {
productGroupId4Blur (tagNo) {
if (this.modalData.productGroupId4 != null && this.modalData.productGroupId4 !== '') {
getChooselistData({"sqlcode": "select product_group_id,product_group_name from product_group where active = 'Y' and type = '4' and product_group_id = '" + this.modalData.productGroupId4 + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and product_group_id = '" + this.modalData.productGroupId4 + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.productGroupId4 = data.baseListData[0].product_group_id
this.modalData.productGroupName4 = data.baseListData[0].product_group_name
} else {
this.$message.warning('该计划人不存在!')
this.modalData.productGroupName4 = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.productGroupName4 = ''
}
})
}
},
//
productGroupId3Blur () {
productGroupId3Blur (tagNo) {
if (this.modalData.productGroupId3 != null && this.modalData.productGroupId3 !== '') {
getChooselistData({"sqlcode": "select product_group_id,product_group_name from product_group where active = 'Y' and type = '3' and product_group_id = '" + this.modalData.productGroupId3 + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and product_group_id = '" + this.modalData.productGroupId3 + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.productGroupId3 = data.baseListData[0].product_group_id
this.modalData.productGroupName3 = data.baseListData[0].product_group_name
} else {
this.$message.warning('该会计组不存在!')
this.modalData.productGroupName3 = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.productGroupName3 = ''
}
})
}
},
//
umIdBlur () {
umIdBlur (tagNo) {
if (this.modalData.umId != null && this.modalData.umId !== '') {
getChooselistData({"sqlcode": "select um_id, um_name from um where active = 'Y' and um_id = '" + this.modalData.umId + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and um_id = '" + this.modalData.umId + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.umId = data.baseListData[0].um_id
this.modalData.umName = data.baseListData[0].um_name
} else {
this.$message.warning('该计量单位不存在!')
this.modalData.umName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.umName = ''
}
})
}
},
//
groupIdBlur () {
groupIdBlur (tagNo) {
if (this.modalData.groupId != null && this.modalData.groupId !== '') {
getChooselistData({"sqlcode": "select group_id, group_name from part_group where active = 'Y' and group_id = '" + this.modalData.groupId + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and group_id = '" + this.modalData.groupId + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.groupId = data.baseListData[0].group_id
this.modalData.groupName = data.baseListData[0].group_name
} else {
this.$message.warning('该产品代码不存在!')
this.modalData.groupName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.groupName = ''
}
})
}
},
// 1
productGroupId1Blur () {
productGroupId1Blur (tagNo) {
if (this.modalData.productGroupId1 != null && this.modalData.productGroupId1 !== '') {
getChooselistData({"sqlcode": "select product_group_id, product_group_name from product_group where active = 'Y' and type = '1' and product_group_id = '" + this.modalData.productGroupId1 + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and product_group_id = '" + this.modalData.productGroupId1 + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.productGroupId1 = data.baseListData[0].product_group_id
this.modalData.productGroupName1 = data.baseListData[0].product_group_name
} else {
this.$message.warning('该商品组1不存在!')
this.modalData.productGroupName1 = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.productGroupName1 = ''
}
})
}
},
//
familyIdBlur () {
familyIdBlur (tagNo) {
if (this.modalData.familyId != null && this.modalData.familyId !== '') {
getChooselistData({"sqlcode": "select family_id, family_name from part_family where active = 'Y' and family_id = '" + this.modalData.familyId + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and family_id = '" + this.modalData.familyId + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.familyId = data.baseListData[0].family_id
this.modalData.familyName = data.baseListData[0].family_name
} else {
this.$message.warning('该产品大类不存在!')
this.modalData.familyName = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.familyName = ''
}
})
}
},
// 2
productGroupId2Blur () {
productGroupId2Blur (tagNo) {
if (this.modalData.productGroupId2 != null && this.modalData.productGroupId2 !== '') {
getChooselistData({"sqlcode": "Select product_group_id, product_group_name from product_group where active = 'Y' and type = '2' and product_group_id = '" + this.modalData.productGroupId2 + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and product_group_id = '" + this.modalData.productGroupId2 + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.productGroupId2 = data.baseListData[0].product_group_id
this.modalData.productGroupName2 = data.baseListData[0].product_group_name
} else {
this.$message.warning('该商品组2不存在!')
this.modalData.productGroupName2 = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.productGroupName2 = ''
}
})
}
},
//
assetClassBlur () {
assetClassBlur (tagNo) {
if (this.modalData.assetClass != null && this.modalData.assetClass !== '') {
getChooselistData({"sqlcode": "Select asset_class, asset_class_desc from plm_asset_class where active = 'Y' and asset_class = '" + this.modalData.assetClass + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and asset_class = '" + this.modalData.assetClass + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.assetClass = data.baseListData[0].asset_class
this.modalData.assetClassDesc = data.baseListData[0].asset_class_desc
} else {
this.$message.warning('该资产等级不存在!')
this.modalData.assetClassDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.assetClassDesc = ''
}
})
}
},
//
partStatusBlur () {
partStatusBlur (tagNo) {
if (this.modalData.partStatus != null && this.modalData.partStatus !== '') {
getChooselistData({"sqlcode": "Select part_status, part_status_desc from plm_part_status where active = 'Y' and part_status = '" + this.modalData.partStatus + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and part_status = '" + this.modalData.partStatus + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.partStatus = data.baseListData[0].part_status
this.modalData.partStatusDesc = data.baseListData[0].part_status_desc
} else {
this.$message.warning('该零件状态不存在!')
this.modalData.partStatusDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.partStatusDesc = ''
}
})
}
},
// abc
abcClassBlur () {
abcClassBlur (tagNo) {
if (this.modalData.abcClass != null && this.modalData.abcClass !== '') {
getChooselistData({"sqlcode": "Select abc_class, abc_class_desc from plm_abc_class where active = 'Y' and abc_class = '" + this.modalData.abcClass + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and abc_class = '" + this.modalData.abcClass + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.abcClass = data.baseListData[0].abc_class
this.modalData.abcClassDesc = data.baseListData[0].abc_class_desc
} else {
this.$message.warning('该ABC类不存在!')
this.modalData.abcClassDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.abcClassDesc = ''
}
})
}
},
//
codeNoBlur () {
if (this.modalData.codeNo != null && this.modalData.codeNo !== '') {
getChooselistData({"sqlcode": "Select Code_no,Code_desc,Active from plm_properties_model_header where function_type='IP' and Code_no = '" + this.modalData.codeNo + "'"}).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.codeNo = data.baseListData[0].Code_no
this.modalData.codeDesc = data.baseListData[0].Code_desc
} else {
this.modalData.codeDesc = ''
}
}
})
}
},
// //
// codeNoBlur (tagNo) {
// if (this.modalData.codeNo != null && this.modalData.codeNo !== '') {
// let tempData = {
// tagno: tagNo,
// conditionSql: " and Code_no = '" + this.modalData.codeNo + "'" + " and site = '" + this.modalData.site + "'"
// }
// verifyData(tempData).then(({data}) => {
// if (data && data.code === 0) {
// if (data.baseListData.length > 0) {
// this.modalData.codeNo = data.baseListData[0].Code_no
// this.modalData.codeDesc = data.baseListData[0].Code_desc
// } else {
// this.$message.warning('')
// this.modalData.codeDesc = ''
// }
// } else {
// this.$message.warning(data.msg)
// this.modalData.codeDesc = ''
// }
// })
// }
// },
//
countryOfOriginBlur () {
countryOfOriginBlur (tagNo) {
if (this.modalData.countryOfOrigin != null && this.modalData.countryOfOrigin !== '') {
getChooselistData({"sqlcode": "Select country_of_origin, country_of_origin_desc from plm_country where active = 'Y' and country_of_origin = '" + this.modalData.countryOfOrigin + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and country_of_origin = '" + this.modalData.countryOfOrigin + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.countryOfOrigin = data.baseListData[0].country_of_origin
this.modalData.countryOfOriginDesc = data.baseListData[0].country_of_origin_desc
} else {
this.$message.warning('该来源国家不存在!')
this.modalData.countryOfOriginDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.countryOfOriginDesc = ''
}
})
}
},
//
regionOfOriginBlur () {
regionOfOriginBlur (tagNo) {
if (this.modalData.regionOfOrigin != null && this.modalData.regionOfOrigin !== '') {
getChooselistData({"sqlcode": "Select region_of_origin, region_of_origin_desc from plm_region_of_origin where active = 'Y' and region_of_origin = '" + this.modalData.regionOfOrigin + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and region_of_origin = '" + this.modalData.regionOfOrigin + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.regionOfOrigin = data.baseListData[0].region_of_origin
this.modalData.regionOfOriginDesc = data.baseListData[0].region_of_origin_desc
} else {
this.$message.warning('该区域代码不存在!')
this.modalData.regionOfOriginDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.regionOfOriginDesc = ''
}
})
}
},
//
customsStatNoBlur () {
customsStatNoBlur (tagNo) {
if (this.modalData.customsStatNo != null && this.modalData.customsStatNo !== '') {
getChooselistData({"sqlcode": "Select customs_stat_no, customs_stat_desc from plm_customs_stat where active = 'Y' and customs_stat_no = '" + this.modalData.customsStatNo + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and customs_stat_no = '" + this.modalData.customsStatNo + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.customsStatNo = data.baseListData[0].customs_stat_no
this.modalData.customsStatDesc = data.baseListData[0].customs_stat_desc
} else {
this.$message.warning('该海关统计序号不存在!')
this.modalData.customsStatDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.customsStatDesc = ''
}
})
}
},
//
partCostGroupIdBlur () {
partCostGroupIdBlur (tagNo) {
if (this.modalData.partCostGroupId != null && this.modalData.partCostGroupId !== '') {
getChooselistData({"sqlcode": "Select part_cost_group_id, part_cost_group_desc from plm_part_cost_group where active = 'Y' and part_cost_group_id = '" + this.modalData.partCostGroupId + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and part_cost_group_id = '" + this.modalData.partCostGroupId + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.partCostGroupId = data.baseListData[0].part_cost_group_id
this.modalData.partCostGroupDesc = data.baseListData[0].part_cost_group_desc
} else {
this.$message.warning('该零件成本组不存在!')
this.modalData.partCostGroupDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.partCostGroupDesc = ''
}
})
}
},
//
planningMethodBlur () {
planningMethodBlur (tagNo) {
if (this.modalData.planningMethod != null && this.modalData.planningMethod !== '') {
getChooselistData({"sqlcode": "Select planning_method, planning_method_desc from plm_planning_method where active = 'Y' and planning_method = '" + this.modalData.planningMethod + "'"}).then(({data}) => {
let tempData = {
tagno: tagNo,
conditionSql: " and planning_method = '" + this.modalData.planningMethod + "'" + " and site = '" + this.modalData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.planningMethod = data.baseListData[0].planning_method
this.modalData.planningMethodDesc = data.baseListData[0].planning_method_desc
} else {
this.$message.warning('该计划方法不存在!')
this.modalData.planningMethodDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.planningMethodDesc = ''
}
})
}
@ -5035,6 +5170,44 @@
})
},
//
previewFile (row) {
//
let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
let type = ''
if (image.includes(row.fileType.toLowerCase())) {
type = 'image/' + row.fileType
}
let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
if (video.includes(row.fileType.toLowerCase())) {
type = 'video/' + row.fileType
}
let txt = ['txt']
if (txt.includes(row.fileType.toLowerCase())) {
type = 'text/plain'
}
let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
if (office.includes(row.fileType.toLowerCase())) {
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return
}
let pdf = ['pdf']
if (pdf.includes(row.fileType.toLowerCase())) {
type = 'application/pdf'
}
if (type === ''){
this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
return;
}
downLoadQuotationFile(row).then(({data}) => {
const blob = new Blob([data], { type: type });
// URL
const fileURL = URL.createObjectURL(blob);
//
const newTab = window.open(fileURL, '_blank')
})
},
// ======== chooseList ========
/**
* 获取基础数据列表S

43
src/views/modules/part/routingManagement.vue

@ -81,14 +81,14 @@
<selectDiv ref="selectDiv"></selectDiv>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- routing新增/编辑模态框 -->
@ -400,7 +400,7 @@
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px">
<el-form-item prop="workCenterNo" :rules="componentRules.workCenterNo">
<span style="cursor: pointer" slot="label" @click="getBaseList(119)"><a herf="#">加工中心编码</a></span>
<el-input v-model="componentData.workCenterNo" style="width: 221px"></el-input>
<el-input v-model="componentData.workCenterNo" @blur="workCenterBlur(119)" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'加工中心名称'">
<el-input v-model="componentData.workCenterDesc" disabled style="width: 221px"></el-input>
@ -841,6 +841,7 @@ import {
workGuidelineEdit, // workGuideline
deleteWorkGuideline, // workGuideline
} from '@/api/part/routingOperationWorkGuidelines.js'
import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
import ChooseList from '@/views/modules/common/Chooselist'
export default {
@ -4006,6 +4007,30 @@ export default {
this.componentData.laborRunFactor = this.componentData.machRunFactor
},
//
workCenterBlur (tagNo) {
if (this.componentData.workCenterNo != null && this.componentData.workCenterNo !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and work_center_no = '" + this.componentData.workCenterNo + "'" + " and site = '" + this.componentData.site + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.componentData.workCenterNo = data.baseListData[0].work_center_no
this.componentData.workCenterDesc = data.baseListData[0].work_center_desc
} else {
this.$message.warning('该加工中心不存在!')
this.componentData.workCenterDesc = ''
}
} else {
this.$message.warning(data.msg)
this.componentData.workCenterDesc = ''
}
})
}
},
// ======== ========
/**
* 导出excel

57
src/views/modules/processManagement/processBindingInfo.vue

@ -105,9 +105,9 @@
</el-form>-->
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="workflowId" :rules="rules.workflowId">
<span style="cursor: pointer" v-if="modalData.flag==='1'" slot="label" @click="getBaseList(1015)"><a herf="#">流程ID</a></span>
<span style="cursor: pointer" v-if="modalData.flag === '1'" slot="label" @click="getBaseList(1015)"><a herf="#">流程ID</a></span>
<span style="cursor: pointer" v-else slot="label" >流程ID</span>
<el-input v-model="modalData.workflowId" style="width: 120px" :disabled="maintenanceFlag"></el-input>
<el-input v-model="modalData.workflowId" @blur="workflowBlur(1015)" style="width: 120px" :disabled="maintenanceFlag"></el-input>
</el-form-item>
<el-form-item label="流程名称" style="margin-left: -10px">
<el-input v-model="modalData.workflowname" clearable style="width: 330px" disabled></el-input>
@ -116,8 +116,8 @@
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="menuId" :rules="rules.menuId">
<span style="cursor: pointer" slot="label" v-if="modalData.flag==='1'" @click="getBaseList(1014)"><a herf="#">菜单ID</a></span>
<span style="cursor: pointer" slot="label" v-else >菜单ID</span>
<el-input v-model="modalData.menuId" style="width: 120px" :disabled="maintenanceFlag"></el-input>
<span style="cursor: pointer" slot="label" v-else >菜单ID</span>
<el-input v-model="modalData.menuId" @blur="menuBlur(1014)" style="width: 120px" :disabled="maintenanceFlag"></el-input>
</el-form-item>
<el-form-item label="菜单名称" style="margin-left: -10px">
<el-input v-model="modalData.name" clearable style="width: 330px" disabled></el-input>
@ -386,6 +386,7 @@
saveAuthorityList, //
editNodeInfo, //
} from '@/api/processManagement/processManagement.js'
import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
import Chooselist from '@/views/modules/common/Chooselist'
import DictDataSelect from '../sys/dict-data-select.vue'
export default {
@ -1638,6 +1639,54 @@
}
},
// ID
workflowBlur (tagNo) {
if (this.modalData.workflowId != null && this.modalData.workflowId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and Workflowid = '" + this.modalData.workflowId + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.workflowId = data.baseListData[0].Workflowid
this.modalData.workflowname = data.baseListData[0].Workflowname
} else {
this.$message.warning('该流程不存在!')
this.modalData.workflowname = ''
}
} else {
this.$message.warning('该流程不存在!')
this.modalData.workflowname = ''
}
})
}
},
// ID
menuBlur (tagNo) {
if (this.modalData.menuId != null && this.modalData.menuId !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and Menu_id = '" + this.modalData.menuId + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.menuId = data.baseListData[0].Menu_id
this.modalData.name = data.baseListData[0].Name
} else {
this.$message.warning('该菜单不存在!')
this.modalData.name = ''
}
} else {
this.$message.warning('该菜单不存在!')
this.modalData.name = ''
}
})
}
},
// ======== ========
/**
* 导出excel

Loading…
Cancel
Save