|
|
|
@ -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 |
|
|
|
|