Browse Source

2024.1.5

master
yuejiayang 2 years ago
parent
commit
2c8f3a079e
  1. 237
      src/views/modules/customer/customerInformationManagement.vue
  2. 688
      src/views/modules/part/partInformation.vue

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

@ -106,7 +106,7 @@
<el-form-item label="年营业额">
<el-input v-model="modalData.turnoverOfYear" :readonly="detailModalFlag" style="width: 222px"></el-input>
</el-form-item>
<el-form-item label="年潜在入">
<el-form-item label="年潜在入">
<el-input v-model="modalData.potentialRevenueOfYear" :readonly="detailModalFlag" style="width: 222px"></el-input>
</el-form-item>
</el-form>
@ -121,34 +121,34 @@
</el-select>
</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 label="联系人" prop="contactName" :rules="rules.contactName">
<el-input v-model="modalData.contactName" :readonly="detailModalFlag" style="width: 222px"></el-input>
</el-form-item>
<el-form-item label="联系电话" prop="contactPhoneNumber1" :rules="rules.contactPhoneNumber1">
<el-input v-model="modalData.contactPhoneNumber1" :readonly="detailModalFlag" style="width: 222px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="公司名称">
<el-input v-model="modalData.companyName" :readonly="detailModalFlag" style="width: 457px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="岗位描述">
<el-input v-model="modalData.jobDescription" :readonly="detailModalFlag" style="width: 457px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="联系地址">
<el-input v-model="modalData.addressName" :readonly="detailModalFlag" style="width: 457px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="备注信息">
<el-input v-model="modalData.remark" :readonly="detailModalFlag" style="width: 457px"></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 label="联系人" prop="contactName" :rules="rules.contactName">-->
<!-- <el-input v-model="modalData.contactName" :readonly="detailModalFlag" style="width: 222px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="联系电话" prop="contactPhoneNumber1" :rules="rules.contactPhoneNumber1">-->
<!-- <el-input v-model="modalData.contactPhoneNumber1" :readonly="detailModalFlag" style="width: 222px"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item label="公司名称">-->
<!-- <el-input v-model="modalData.companyName" :readonly="detailModalFlag" style="width: 457px"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item label="岗位描述">-->
<!-- <el-input v-model="modalData.jobDescription" :readonly="detailModalFlag" style="width: 457px"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item label="联系地址">-->
<!-- <el-input v-model="modalData.addressName" :readonly="detailModalFlag" style="width: 457px"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item label="备注信息">-->
<!-- <el-input v-model="modalData.remark" :readonly="detailModalFlag" style="width: 457px"></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 label="关键客户" prop="importantCustomer" :rules="rules.importantCustomer">
<el-select v-model="modalData.importantCustomer" :disabled="detailModalFlag" style="width: 222px">
@ -170,15 +170,19 @@
type="textarea"
v-model="modalData.customerDescription"
readonly
:rows="1"
:rows="2"
resize='none'
maxlength="300"
show-word-limit
:readonly="detailModalFlag"
style="width: 457px;height: 20px">
</el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -2px;">-->
<el-form-item label="客户地址">
<el-input v-model="modalData.addressName" :readonly="detailModalFlag" style="width: 457px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button v-if="modalData.flag !== '3'" type="primary" @click="saveData()">保存</el-button>
<el-button type="primary" @click="modalFlag = false">关闭</el-button>
@ -211,14 +215,17 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="contactModalData" :rules="contactRules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="主联系人" prop="primaryContact" :rules="contactRules.primaryContact">
<el-select v-model="contactModalData.primaryContact" :disabled="contactDetailModalFlag" style="width: 222px">
<el-form-item label="部门" prop="departmentName">
<el-input v-model="contactModalData.departmentName" :readonly="contactDetailModalFlag" style="width: 144px"></el-input>
</el-form-item>
<el-form-item label="默认联系人" prop="primaryContact" :rules="contactRules.primaryContact">
<el-select v-model="contactModalData.primaryContact" :disabled="contactDetailModalFlag" style="width: 143px">
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="contactStatus" :rules="contactRules.contactStatus">
<el-select v-model="contactModalData.contactStatus" :disabled="contactDetailModalFlag" style="width: 222px">
<el-select v-model="contactModalData.contactStatus" :disabled="contactDetailModalFlag" style="width: 144px">
<el-option label="启用" value="启用"></el-option>
<el-option label="停用" value="停用"></el-option>
</el-select>
@ -231,10 +238,24 @@
</el-form>
<el-form :inline="true" label-position="top" :model="contactModalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="备注信息">
<el-input v-model="contactModalData.remark" :readonly="contactDetailModalFlag" style="width: 457px"></el-input>
<el-input
type="textarea"
v-model="contactModalData.remark"
readonly
:rows="2"
resize='none'
show-word-limit
:readonly="contactDetailModalFlag"
style="width: 457px;height: 20px">
</el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<!-- <el-form :inline="true" label-position="top" :model="contactModalData" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item label="备注信息">-->
<!-- <el-input v-model="contactModalData.remark" :readonly="contactDetailModalFlag" style="width: 457px"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<el-footer style="height:40px;margin-top: 34px;text-align:center">
<el-button v-if="contactModalData.flag !== '3'" type="primary" @click="saveContactData()">保存</el-button>
<el-button type="primary" @click="contactModalFlag = false">关闭</el-button>
</el-footer>
@ -242,43 +263,36 @@
<!-- 客户联系地址模态框 -->
<el-dialog :title="addressModalData.title" :close-on-click-modal="false" v-drag :visible.sync="addressModalFlag" width="500px">
<el-form :inline="true" label-position="top" :model="addressModalData" :rules="addressRules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="地址" prop="addressName" :rules="addressRules.addressName">
<el-input v-model="addressModalData.addressName" style="width: 457px"></el-input>
<el-form-item label="地址类型" prop="addressType" :rules="addressRules.addressType">
<dict-data-select v-if="addressModalFlag" v-model="addressModalData.addressType" :disabled="addressDetailModalFlag" style="width: 170px" dict-type="plm_customer_address_address_type">
</dict-data-select>
</el-form-item>
<el-form-item label="公司名称">
<el-input v-model="addressModalData.companyName" :readonly="addressDetailModalFlag" style="width: 273px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="addressModalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="单位">
<el-input v-model="addressModalData.unit" :readonly="addressDetailModalFlag" style="width: 457px"></el-input>
<el-form :inline="true" label-position="top" :model="addressModalData" :rules="addressRules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="地址" prop="addressName" :rules="addressRules.addressName">
<el-input v-model="addressModalData.addressName" style="width: 457px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="addressModalData" :rules="addressRules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="主要地址" prop="primaryAddress" :rules="addressRules.primaryAddress">
<el-select v-model="addressModalData.primaryAddress" :disabled="addressDetailModalFlag" style="width: 222px">
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
<el-form-item label="默认地址" prop="defaultAddress" :rules="addressRules.defaultAddress">
<el-input v-model="addressModalData.defaultAddress" :disabled="addressDetailModalFlag" style="width: 314px"></el-input>
</el-form-item>
<el-form-item label="状态" prop="addressStatus" :rules="addressRules.addressStatus">
<el-select v-model="addressModalData.addressStatus" :disabled="addressDetailModalFlag" style="width: 222px">
<el-select v-model="addressModalData.addressStatus" :disabled="addressDetailModalFlag" style="width: 130px">
<el-option label="启用" value="启用"></el-option>
<el-option label="停用" value="停用"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="addressModalData" :rules="addressRules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="地址类型" prop="addressType" :rules="addressRules.addressType">
<el-select v-model="addressModalData.addressType" :disabled="addressDetailModalFlag" style="width: 457px">
<el-option label="类型1" value="类型1"></el-option>
<el-option label="类型2" value="类型2"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="addressModalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="备注信息">
<el-input v-model="addressModalData.remark" :readonly="addressDetailModalFlag" style="width: 457px"></el-input>
<el-input type="textarea" v-model="addressModalData.remark" :rows="3" :readonly="addressDetailModalFlag" resize='none' show-word-limit style="width: 457px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-footer style="height:42px;margin-top: 53px;text-align:center">
<el-button v-if="addressModalData.flag !== '3'" type="primary" @click="saveAddressData()">保存</el-button>
<el-button type="primary" @click="addressModalFlag = false">关闭</el-button>
</el-footer>
@ -699,8 +713,10 @@
saveProjectInfo
} from "@/api/project/project.js"
import Chooselist from '@/views/modules/common/Chooselist'
import DictDataSelect from '../sys/dict-data-select.vue'
export default {
components: {
DictDataSelect,
Chooselist
},
watch: {
@ -771,13 +787,15 @@
updateBy: '',
primaryContact: '',
contactStatus: '',
addressName: ''
addressName: '',
customerAddress:''
},
contactModalData: {
flag: '',
title: '',
site: this.$store.state.user.site,
customerNo: '',
customerDesc: '',
contactId: '',
contactName: '',
contactLandlineNumber: '',
@ -785,6 +803,7 @@
contactPhoneNumber2: '',
contactPhoneNumber3: '',
position: '',
departmentName:'',
mailbox: '',
primaryContact: '',
contactStatus: '',
@ -799,10 +818,11 @@
title: '',
site: this.$store.state.user.site,
customerNo: '',
customerDesc: '',
addressId: '',
addressName: '',
unit: '',
primaryAddress: '',
companyName: '',
defaultAddress: '',
addressStatus: '',
addressType: '',
remark: '',
@ -816,10 +836,11 @@
title: '',
site: this.$store.state.user.site,
customerNo: '',
customerDesc: '',
addressId: '',
addressName: '',
unit: '',
primaryAddress: '',
companyName: '',
defaultAddress: '',
addressStatus: '',
addressType: '',
remark: '',
@ -1108,6 +1129,24 @@
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 101001,
serialNumber: '101001Table2DepartmentName',
tableId: '101001Table2',
tableName: '客户联系人表',
columnProp: 'departmentName',
headerAlign: 'center',
align: 'center',
columnLabel: '部门',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 101001,
@ -1135,7 +1174,7 @@
columnProp: 'primaryContact',
headerAlign: 'center',
align: 'center',
columnLabel: '联系人',
columnLabel: '默认联系人',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1239,74 +1278,74 @@
{
userId: this.$store.state.user.name,
functionId: 101001,
serialNumber: '101001Table3AddressName',
serialNumber: '101001Table3AddressType',
tableId: '101001Table3',
tableName: '客户联系地址表',
columnProp: 'addressName',
columnProp: 'addressType',
headerAlign: 'center',
align: 'center',
columnLabel: '地址',
columnLabel: '地址类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 101001,
serialNumber: '101001Table3Unit',
serialNumber: '101001Table3CompanyName',
tableId: '101001Table3',
tableName: '客户联系地址表',
columnProp: 'unit',
columnProp: 'companyName',
headerAlign: 'center',
align: 'center',
columnLabel: '单位',
columnLabel: '公司名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
columnWidth: 160
},
{
userId: this.$store.state.user.name,
functionId: 101001,
serialNumber: '101001Table3AddressType',
serialNumber: '101001Table3AddressName',
tableId: '101001Table3',
tableName: '客户联系地址表',
columnProp: 'addressType',
columnProp: 'addressName',
headerAlign: 'center',
align: 'center',
columnLabel: '地址类型',
columnLabel: '地址',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
columnWidth: 160
},
{
userId: this.$store.state.user.name,
functionId: 101001,
serialNumber: '101001Table3Active',
serialNumber: '101001Table3DefaultAddress',
tableId: '101001Table3',
tableName: '客户联系地址表',
columnProp: 'primaryAddress',
columnProp: 'defaultAddress',
headerAlign: 'center',
align: 'center',
columnLabel: '主要地址',
columnLabel: '默认地址',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
columnWidth: 160
},
{
userId: this.$store.state.user.name,
@ -1685,7 +1724,7 @@
trigger: 'change'
}
],
primaryAddress: [
defaultAddress: [
{
required: true,
message: ' ',
@ -1911,7 +1950,8 @@
getCustomerAddressList () {
let tempData = {
site: this.$store.state.user.site,
customerNo: this.customerCurrentRow.customerNo
customerNo: this.customerCurrentRow.customerNo,
customerDesc: this.customerCurrentRow.customerDesc
}
customerAddressSearch(tempData).then(({data}) => {
if (data && data.code === 0) {
@ -1964,7 +2004,7 @@
primaryContact: '',
contactStatus: '',
addressName: '',
primaryAddress: 'Y',
defaultAddress: 'Y',
addressStatus: '启用',
addressType: '类型一',
createBy: this.$store.state.user.name
@ -1989,8 +2029,9 @@
contactPhoneNumber2: '',
contactPhoneNumber3: '',
position: '',
departmentName:'',
mailbox: '',
primaryContact: '',
primaryContact: 'N',
contactStatus: '',
remark: '',
createDate: '',
@ -2010,8 +2051,8 @@
customerNo: this.customerCurrentRow.customerNo,
addressId: '',
addressName: '',
unit: '',
primaryAddress: '',
companyName: this.customerCurrentRow.customerDesc,
defaultAddress: '',
addressStatus: '',
addressType: '',
remark: '',
@ -2086,7 +2127,7 @@
primaryContact: 'Y',
contactStatus: row.contactStatus,
addressName: row.addressName,
primaryAddress: 'Y',
defaultAddress: 'Y',
updateBy: this.$store.state.user.name
}
this.modalDisableFlag = true
@ -2110,6 +2151,7 @@
contactPhoneNumber2: row.contactPhoneNumber2,
contactPhoneNumber3: row.contactPhoneNumber3,
position: row.position,
departmentName: row.departmentName,
mailbox: row.mailbox,
primaryContact: row.primaryContact,
contactStatus: row.contactStatus,
@ -2132,8 +2174,8 @@
customerNo: row.customerNo,
addressId: row.addressId,
addressName: row.addressName,
unit: row.unit,
primaryAddress: row.primaryAddress,
companyName: row.companyName,
defaultAddress: row.defaultAddress,
addressStatus: row.addressStatus,
addressType: row.addressType,
remark: row.remark,
@ -2255,6 +2297,7 @@
contactPhoneNumber2: row.contactPhoneNumber2,
contactPhoneNumber3: row.contactPhoneNumber3,
position: row.position,
departmentName: row.departmentName,
mailbox: row.mailbox,
primaryContact: row.primaryContact,
contactStatus: row.contactStatus,
@ -2275,8 +2318,8 @@
customerNo: row.customerNo,
addressId: row.addressId,
addressName: row.addressName,
unit: row.unit,
primaryAddress: row.primaryAddress,
companyName: row.companyName,
defaultAddress: row.defaultAddress,
addressStatus: row.addressStatus,
addressType: row.addressType,
remark: row.remark,
@ -2369,13 +2412,13 @@
}).then(() => {
let tempContactName = null
for (let i = 0; i < this.contactSelections.length; i++){
//
//
if (this.contactSelections[i].primaryContact === 'Y') {
tempContactName = this.contactSelections[i].contactName
}
}
if (tempContactName !== '' || tempContactName != null) {
this.$confirm(tempContactName +`联系人,是否确认删除?`, '提示', {
this.$confirm(tempContactName +`默认联系人,是否确认删除?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -2443,7 +2486,7 @@
let tempAddressName = null
for (let i = 0; i < this.addressSelections.length; i++){
//
if (this.addressSelections[i].primaryAddress === 'Y') {
if (this.addressSelections[i].defaultAddress === 'Y') {
tempAddressName = this.addressSelections[i].addressName
}
}
@ -2594,8 +2637,12 @@
this.$message.warning('请输入公司职务!')
return
}
if(this.contactModalData.departmentName === '' || this.contactModalData.departmentName == null){
this.$message.warning('请输入部门名称')
return
}
if (this.contactModalData.primaryContact === '' || this.contactModalData.primaryContact == null) {
this.$message.warning('请选择是否为主联系人!')
this.$message.warning('请选择是否为默认联系人!')
return
}
if (this.contactModalData.contactStatus === '' || this.contactModalData.contactStatus == null) {
@ -2648,7 +2695,7 @@
this.$message.warning('请输入地址!')
return
}
if (this.addressModalData.primaryAddress === '' || this.addressModalData.primaryAddress == null) {
if (this.addressModalData.defaultAddress === '' || this.addressModalData.defaultAddress == null) {
this.$message.warning('请选择是否为主要地址!')
return
}

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

@ -118,7 +118,7 @@
<el-dialog :title="modalData.title" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="960px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码" prop="partNo" :rules="rules.partNo">
<el-input v-model="modalData.partNo" clearable style="width: 120px"></el-input>
<el-input v-model="modalData.partNo" clearable style="width: 120px" :disabled="modalDisableFlag"></el-input>
</el-form-item>
<el-form-item label="物料描述" prop="partDesc" :rules="rules.partDesc" style="margin-left: -10px">
<el-input v-model="modalData.partDesc" clearable style="width: 330px"></el-input>
@ -153,6 +153,27 @@
<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 label="净重" prop="weightNet" :rules="rules.weightNet">
<el-input v-model="modalData.weightNet" clearable style="width: 170px"></el-input>
</el-form-item>
<el-form-item label="净重单位" prop="uomForWeightNet" :rules="rules.uomForWeightNet">
<dict-data-select v-if="modalFlag" v-model="modalData.uomForWeightNet" style="width: 170px" dict-type="part_uom_for_weight_net"></dict-data-select>
</el-form-item>
<el-form-item label="体积" prop="volumeNet" :rules="rules.volumeNet">
<el-input v-model="modalData.volumeNet" clearable style="width: 170px"></el-input>
</el-form-item>
<el-form-item label="体积单位" prop="uomForVolumeNet" :rules="rules.uomForVolumeNet">
<dict-data-select v-if="modalFlag" v-model="modalData.uomForVolumeNet" style="width: 170px" dict-type="part_uom_for_volume_net"></dict-data-select>
</el-form-item>
<el-form-item label="批号跟踪" prop="lotTrackingCode" :rules="rules.lotTrackingCode">
<el-select v-model="modalData.lotTrackingCode" style="width: 185px">
<el-option label="Lot Tracking" value="Lot Tracking"></el-option>
<el-option label="Not Lot Tracking" value="Not Lot Tracking"></el-option>
<el-option label="Order Base" value="Order Base"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="familyName" :rules="rules.familyName">
<span slot="label" @click="getBaseList(108)"><a herf="#">物料分类</a></span>
@ -289,6 +310,45 @@
</el-table-column>
</el-table>
</el-tab-pane>
<!-- 制造商页签 -->
<el-tab-pane label="制造商" name="part_manufacturer">
<el-form label-position="top" style="margin-top: 5px; margin-left: 0px;">
<el-form :inline="true" label-position="top" style="margin-top: 5px">
<el-button type="primary" @click="savePartManufacturer()">新增</el-button>
</el-form>
</el-form>
<el-table
:data="partManufacturerList"
:height="secondHeight"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnManufacturerList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="150"
fixed="right"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="deleteManufacturer2(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<!-- 文档页签 -->
<el-tab-pane label="文档" name="part_file">
<el-form label-position="top" style="margin-top: 5px; margin-left: 0px;">
@ -513,6 +573,103 @@
<el-button type="primary" @click="agentModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 制造商-> 快速新增 -->
<el-dialog title="新增" @close="refreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="manufacturerModelFlag" width="900px">
<div style="font-size: 12px">
<el-form :inline="true" label-position="top" :model="manufacturerData">
<el-form-item :label="'制造商编码'">
<el-input v-model="manufacturerData.manufacturerId" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'制造商名称'">
<el-input v-model="manufacturerData.manufacturerName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getManufacturerList()">查询</el-button>
</el-form-item>
</el-form>
</div>
<el-container style="margin-top: 0px;">
<el-main style="width: 350px; padding: 1px">
<span style="font-size: 12px" >可选制造商:</span>
<el-table
height="400px"
:data="manufacturerList1"
border
ref="manufacturerTable1"
@row-click="manufacturerClickRow1"
@selection-change="selectionManufacturer1"
highlight-current-row
style="width: 100%">
<el-table-column
type="selection"
header-align="center"
align="center"
:selectable="selectFlag"
width="50">
</el-table-column>
<el-table-column
prop="manufacturerId"
header-align="center"
align="center"
min-width="80"
label="制造商编码">
</el-table-column>
<el-table-column
prop="manufacturerName"
header-align="center"
align="center"
min-width="120"
label="制造商名称">
</el-table-column>
</el-table>
</el-main>
<el-main style="width: 111px;padding: -1px">
<div style="margin-top: 182px;margin-left: 18px">
<el-button type="primary" @click="addManufacturer()">添加>></el-button>
</div>
<div style="margin-top: 15px;margin-left: 18px">
<el-button type="primary" @click="deleteManufacturer()">删除<<</el-button>
</div>
</el-main>
<el-main style="width: 350px;padding: 1px">
<span style="font-size: 12px" >已有制造商:</span>
<el-table
height="400px"
:data="manufacturerList2"
border
ref="manufacturerTable2"
@row-click="manufacturerClickRow2"
@selection-change="selectionManufacturer2"
highlight-current-row
style="width: 100%">
<el-table-column
type="selection"
header-align="center"
align="center"
:selectable="selectFlag"
width="50">
</el-table-column>
<el-table-column
prop="manufacturerId"
header-align="center"
align="center"
min-width="80"
label="制造商编码">
</el-table-column>
<el-table-column
prop="manufacturerName"
header-align="center"
align="center"
min-width="120"
label="制造商名称">
</el-table-column>
</el-table>
</el-main>
</el-container>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="manufacturerModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- chooseList模态框 -->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
@ -535,7 +692,13 @@
getAgentListBy, //
addPartAgent, //
deletePartAgent, //
deleteAgent // ()
deleteAgent, // ()
getManufacturerList, //
getPartManufacturer, //
getManufacturerListBy, //
addPartManufacturer, //
deletePartManufacturer, //
deleteManufacturer // ()
} from '@/api/part/partInformation.js'
import {
getFileContentList, //
@ -544,8 +707,10 @@
} from '@/api/quotation/quotationInformation.js'
import Chooselist from '@/views/modules/common/Chooselist'
import partUploadFile from "./part_upload_file"
import DictDataSelect from '../sys/dict-data-select.vue'
export default {
components: {
DictDataSelect,
Chooselist,
partUploadFile
},
@ -613,6 +778,11 @@
groupName: '',
umId: '',
umName: '',
weightNet: '',
uomForWeightNet: '',
volumeNet: '',
uomForVolumeNet: '',
lotTrackingCode: '',
active: '',
remark: '',
supplierId: '',
@ -651,10 +821,16 @@
agentId: '',
agentName: '',
},
manufacturerData: {
site: this.$store.state.user.site,
manufacturerId: '',
manufacturerName: '',
},
// ======== ========
dataList: [],
partItemList: [],
partAgentList: [],
partManufacturerList: [],
fileContentList: [],
availableValueList:[],
agentList: [],
@ -663,6 +839,12 @@
agentSelections2: [],
agentList1: [],
agentList2: [],
manufacturerList: [],
manufacturerSelections: [],
manufacturerSelections1: [],
manufacturerSelections2: [],
manufacturerList1: [],
manufacturerList2: [],
// ======== ========
columnList: [
{
@ -758,49 +940,103 @@
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1PartType',
serialNumber: '104001Table1WeightNet',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'partType',
columnProp: 'weightNet',
headerAlign: 'center',
align: 'right',
columnLabel: '净重',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1UomForWeightNet',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'uomForWeightNet',
headerAlign: 'center',
align: 'left',
columnLabel: '物料类别',
columnLabel: '净重单位',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1FamilyName',
serialNumber: '104001Table1VolumeNet',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'familyName',
columnProp: 'volumeNet',
headerAlign: 'center',
align: 'right',
columnLabel: '体积',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1UomForVolumeNet',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'uomForVolumeNet',
headerAlign: 'center',
align: 'left',
columnLabel: '物料分类',
columnLabel: '体积单位',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1GroupName',
serialNumber: '104001Table1LotTrackingCode',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'groupName',
columnProp: 'lotTrackingCode',
headerAlign: 'center',
align: 'left',
columnLabel: '物料分组',
columnLabel: '批号跟踪',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1PartType',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'partType',
headerAlign: 'center',
align: 'left',
columnLabel: '物料类别',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -812,13 +1048,13 @@
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1OtherGroup1',
serialNumber: '104001Table1FamilyName',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'productGroupName1',
columnProp: 'familyName',
headerAlign: 'center',
align: 'left',
columnLabel: '商品组1',
columnLabel: '物料分类',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -830,13 +1066,13 @@
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1OtherGroup2',
serialNumber: '104001Table1GroupName',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'productGroupName2',
columnProp: 'groupName',
headerAlign: 'center',
align: 'left',
columnLabel: '商品组2',
columnLabel: '物料分组',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -848,13 +1084,13 @@
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1OtherGroup3',
serialNumber: '104001Table1OtherGroup1',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'productGroupName3',
columnProp: 'productGroupName1',
headerAlign: 'center',
align: 'left',
columnLabel: '会计组',
columnLabel: '商品组1',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -866,13 +1102,13 @@
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1OtherGroup4',
serialNumber: '104001Table1OtherGroup2',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'productGroupName4',
columnProp: 'productGroupName2',
headerAlign: 'center',
align: 'left',
columnLabel: '计划员',
columnLabel: '商品组2',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -884,56 +1120,56 @@
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1ItemNo',
serialNumber: '104001Table1OtherGroup3',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'codeDesc',
columnProp: 'productGroupName3',
headerAlign: 'center',
align: 'left',
columnLabel: '属性模板',
columnLabel: '会计组',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1ManufacturerName',
serialNumber: '104001Table1OtherGroup4',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'manufacturerName',
columnProp: 'productGroupName4',
headerAlign: 'center',
align: 'left',
columnLabel: '制造商',
columnLabel: '计划员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table1AgentName',
serialNumber: '104001Table1ItemNo',
tableId: '104001Table1',
tableName: '物料信息表',
columnProp: 'agentName',
columnProp: 'codeDesc',
headerAlign: 'center',
align: 'left',
columnLabel: '代理商',
columnLabel: '属性模板',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
columnWidth: 100
},
{
userId: this.$store.state.user.name,
@ -1257,6 +1493,127 @@
fixed: '',
}
],
columnManufacturerList: [
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table3ManufacturerId',
tableId: "104001Table3",
tableName: "物料制造商表",
columnProp: 'manufacturerId',
headerAlign: "center",
align: "center",
columnLabel: '制造商编码',
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table3ManufacturerName',
tableId: "104001Table3",
tableName: "物料制造商表",
columnProp: 'manufacturerName',
headerAlign: "center",
align: "center",
columnLabel: '制造商名称',
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table3Active',
tableId: '104001Table3',
tableName: '物料制造商表',
columnProp: 'active',
headerAlign: 'center',
align: 'center',
columnLabel: '是否在用',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table3CreateDate',
tableId: '104001Table3',
tableName: '物料制造商表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '创建时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table3CreateBy',
tableId: '104001Table3',
tableName: '物料制造商表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
columnLabel: '创建人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table3UpdateDate',
tableId: '104001Table3',
tableName: '物料制造商表',
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
columnLabel: '更新时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 104001,
serialNumber: '104001Table3UpdateBy',
tableId: '104001Table3',
tableName: '物料制造商表',
columnProp: 'updateBy',
headerAlign: 'center',
align: 'center',
columnLabel: '更新人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
}
],
columnFileList: [
{
userId: this.$store.state.user.name,
@ -1439,6 +1796,41 @@
trigger: 'change'
}
],
weightNet: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
uomForWeightNet: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
volumeNet: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
uomForVolumeNet: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
lotTrackingCode: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
},
// ======== ========
partSelections: [],
@ -1452,7 +1844,8 @@
itemNumberDisableFlag: false,
itemModalDisableFlag: false,
itemModalFlag: false,
agentModelFlag: false
agentModelFlag: false,
manufacturerModelFlag: false
}
},
mounted () {
@ -1525,6 +1918,8 @@
this.getPartAgent()
} else if (this.activeTable === 'part_file') {
this.getFileContentData()
} else if (this.activeTable === 'part_manufacturer') {
this.getPartManufacturer()
}
},
@ -1564,7 +1959,23 @@
}
})
},
/**
* 查询物料制造商
*/
getPartManufacturer () {
let tempData = {
site: this.$store.state.user.site,
partNo: this.partCurrentRow.partNo,
//agentId: this.partCurrentRow.agentId
}
getPartManufacturer(tempData).then(({data}) => {
if (data && data.code === 0) {
this.partManufacturerList = data.rows
} else {
this.partManufacturerList = []
}
})
},
// ======== ========
/**
* 获取数据列表
@ -1612,6 +2023,11 @@
groupName: '',
umId: '',
umName: '',
weightNet: '',
uomForWeightNet: '',
volumeNet: '',
uomForVolumeNet: '',
lotTrackingCode: 'Order Based',
active: 'Y',
remark: '',
supplierId: '',
@ -1656,6 +2072,11 @@
groupName: row.groupName,
umId: row.umId,
umName: row.umName,
weightNet: row.weightNet,
uomForWeightNet: row.uomForWeightNet,
volumeNet: row.volumeNet,
uomForVolumeNet: row.uomForVolumeNet,
lotTrackingCode: row.lotTrackingCode,
active: row.active,
remark: row.remark,
supplierId: row.supplierId,
@ -1849,9 +2270,178 @@
}).catch(() => {
})
},
/**
* 选择制造商
*/
getManufacturerList () {
// //
// this.$nextTick(() => this.$refs.agentTable.clearSelection())
// // id
// let tempDataList = this.modalData.agentId.split(';')
//
getManufacturerListBy(this.manufacturerData).then(({data}) => {
if (data && data.code === 0) {
this.manufacturerList1 = data.rows
// this.agentList.forEach(val => {
// //
// if (tempDataList.includes(val.agentId)) {
// this.$nextTick(() => this.$refs.agentTable.toggleRowSelection(val, true))
// }
// })
// this.agentModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
/**
* 制造商多选
* @param row
*/
manufacturerClickRow (row) {
this.$refs.manufacturerTable.toggleRowSelection(row);
},
/**
* 获得选中的制造商
* @param val
*/
selectionManufacturer (val) {
this.manufacturerSelections = val
},
/**
* 返回列表唯一值
* @param row
* @returns {string|[{trigger: string, message: string, required: boolean}]|*}
*/
getRowKeys2 (row) {
// id
return row.manufacturerId
},
/**
* 确认多选制造商
* @returns {boolean}
*/
confirmManufacturer () {
this.modalData.manufacturerId = ''
this.modalData.manufacturerName = ''
for (let i = 0; i < this.manufacturerSelections.length; i++) {
this.modalData.manufacturerId = this.modalData.manufacturerId + ";" + this.manufacturerSelections[i].manufacturerId
this.modalData.manufacturerName = this.modalData.manufacturerName + ";" + this.agentSelections[i].manufacturerName
}
this.modalData.manufacturerId = this.modalData.manufacturerId.substring(1)
this.modalData.manufacturerName = this.modalData.manufacturerName.substring(1)
this.manufacturerModelFlag = false
},
savePartManufacturer () {
this.manufacturerSelections1 = null
this.manufacturerSelections2 = null
getManufacturerList(this.partCurrentRow).then(({data}) => {
this.manufacturerList1 = data.row1
this.manufacturerList2 = data.row2
})
this.manufacturerData = {
site: this.$store.state.user.site,
manufacturerId: '',
manufacturerName: '',
}
this.manufacturerModelFlag = true
},
//
manufacturerClickRow1 (row) {
this.$refs.manufacturerTable1.toggleRowSelection(row);
},
//
manufacturerClickRow2 (row) {
this.$refs.manufacturerTable2.toggleRowSelection(row);
},
selectionManufacturer1 (val) {
this.manufacturerSelections1 = val
},
selectionManufacturer2 (val) {
this.manufacturerSelections2 = val
},
//
addManufacturer () {
if(this.manufacturerSelections1 == null || this.manufacturerSelections1.length === 0){
this.$message.warning('请选择可选制造商!')
return
}
let inData = {
site: this.$store.state.user.site,
partNo: this.partCurrentRow.partNo,
manufacturerList: this.manufacturerSelections1
}
addPartManufacturer(inData).then(({data}) => {
if (data && data.code === 0) {
getManufacturerList(this.partCurrentRow).then(({data}) => {
this.manufacturerList1 = data.row1
this.manufacturerList2 = data.row2
})
this.manufacturerSelections1 = []
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
deleteManufacturer () {
if(this.manufacturerSelections2 == null || this.manufacturerSelections2.length === 0){
this.$message.warning('请选择已有制造商!')
return
}
let inData = {
site: this.$store.state.user.site,
partNo: this.partCurrentRow.partNo,
manufacturerList: this.manufacturerSelections2
}
deletePartManufacturer(inData).then(({data}) => {
if (data && data.code === 0) {
getManufacturerList(this.partCurrentRow).then(({data}) => {
this.manufacturerList1 = data.row1
this.manufacturerList2 = data.row2
})
this.manufacturerSelections2 = []
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
deleteManufacturer2 (row) {
this.$confirm(`是否删除该制造商?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteManufacturer(row).then(({data}) => {
if (data && data.code === 0) {
this.getPartManufacturer()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
//
refreshDetailList(){
this.getPartAgent()
this.getPartManufacturer()
},
// ======== // ========
@ -1883,6 +2473,26 @@
this.$message.warning('请选择计量单位!')
return
}
if ( this.modalData.weightNet === '' || this.modalData.weightNet == null) {
this.$message.warning('请填写净重!')
return
}
if (this.modalData.uomForWeightNet === '' || this.modalData.uomForWeightNet == null) {
this.$message.warning('请选择净重单位!')
return
}
if (this.modalData.volumeNet === '' || this.modalData.volumeNet == null) {
this.$message.warning('请填写净体积!')
return
}
if (this.modalData.uomForVolumeNet === '' || this.modalData.uomForVolumeNet == null) {
this.$message.warning('请选择净体积单位!')
return
}
if (this.modalData.lotTrackingCode === '' || this.modalData.lotTrackingCode == null) {
this.$message.warning('请选择批次追踪!')
return
}
if (this.modalData.familyId === '' || this.modalData.familyId == null) {
this.$message.warning('请选择分类!')
return

Loading…
Cancel
Save