|
|
|
@ -141,27 +141,15 @@ |
|
|
|
</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 prop="codeDesc" :rules="rules.codeDesc"> |
|
|
|
<span slot="label" @click="getBaseList(20)"><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> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="umName" :rules="rules.umName"> |
|
|
|
<span slot="label" @click="getBaseList(107)"><a herf="#">计量单位</a></span> |
|
|
|
<el-input v-model="modalData.umId" 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 label="净重" prop="weightNet" :rules="rules.weightNet"> |
|
|
|
<el-input v-model="modalData.weightNet" clearable style="width: 170px"></el-input> |
|
|
|
<el-input class="numInput" v-model="modalData.weightNet" @input="handleInput(modalData.weightNet,1)" type="number" 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-input class="numInput" v-model="modalData.volumeNet" @input="handleInput(modalData.volumeNet,2)" type="number" 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> |
|
|
|
@ -174,6 +162,18 @@ |
|
|
|
</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 prop="codeDesc" :rules="rules.codeDesc"> |
|
|
|
<span slot="label" @click="getBaseList(20)"><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> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="umName" :rules="rules.umName"> |
|
|
|
<span slot="label" @click="getBaseList(107)"><a herf="#">计量单位</a></span> |
|
|
|
<el-input v-model="modalData.umId" 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" 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> |
|
|
|
@ -238,6 +238,11 @@ |
|
|
|
<el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 294px" type="border-card" @tab-click="tabClick" class="customer-tab"> |
|
|
|
<!-- 物料属性页签 --> |
|
|
|
<el-tab-pane label="物料属性" name="part_item"> |
|
|
|
<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="updateItemValue">编辑</el-button> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:data="partItemList" |
|
|
|
:height="secondHeight" |
|
|
|
@ -259,16 +264,16 @@ |
|
|
|
<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="updateItemModal(scope.row)">编辑</a> |
|
|
|
</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="updateItemModal(scope.row)">编辑</a>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
<!-- 代理商页签 --> |
|
|
|
@ -392,6 +397,65 @@ |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
<!-- 物料属性值编辑模态框 --> |
|
|
|
<el-dialog title="物料属性" :close-on-click-modal="false" v-drag :visible.sync="updateItemModelFlag" width="1000px"> |
|
|
|
<div class="rq "> |
|
|
|
<el-table |
|
|
|
:data="updatePartItemList" |
|
|
|
height="350px" |
|
|
|
border |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in updateColumnItemList" :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 |
|
|
|
prop="textValue" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="文本值"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input> |
|
|
|
<el-select v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" style="width: 180px" placeholder="请选择"> |
|
|
|
<el-option v-for="item in scope.row.availableValueList" :key="index" :label="item.availableValue" :value="item.availableValue"></el-option> |
|
|
|
</el-select> |
|
|
|
<el-input v-if="scope.row.valueTypeDb !== 'T'" v-model="scope.row.textValue" disabled style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="numValue" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="数字值"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-if="scope.row.valueTypeDb === 'N' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.numValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input> |
|
|
|
<el-select v-if="scope.row.valueTypeDb === 'N' && scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numValue" style="width: 180px" placeholder="请选择"> |
|
|
|
<el-option v-for="item in scope.row.availableValueList" :key="index" :label="item.availableValue" :value="item.availableValue"></el-option> |
|
|
|
</el-select> |
|
|
|
<el-input v-if="scope.row.valueTypeDb !== 'N'" v-model="scope.row.numValue" disabled style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="commitItemValue()">保存</el-button> |
|
|
|
<el-button type="primary" @click="updateItemModelFlag=false">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 物料属性值编辑模态框 --> |
|
|
|
<el-dialog title="属性项目" :close-on-click-modal="false" v-drag :visible.sync="itemModalFlag" width="310px"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
@ -422,60 +486,6 @@ |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- <!– 代理商模态框 –>--> |
|
|
|
<!-- <el-dialog title="代理商清单" :close-on-click-modal="false" v-drag :visible.sync="agentModelFlag" width="520px">--> |
|
|
|
<!-- <div class="rq">--> |
|
|
|
<!-- <el-form :inline="true" label-position="top" :model="agentData">--> |
|
|
|
<!-- <el-form-item :label="'代理商编码'">--> |
|
|
|
<!-- <el-input v-model="agentData.agentId" clearable style="width: 120px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item :label="'代理商名称'">--> |
|
|
|
<!-- <el-input v-model="agentData.agentName" clearable style="width: 120px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item :label="' '">--> |
|
|
|
<!-- <el-button type="primary" @click="getAgentList()">查询</el-button>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-form>--> |
|
|
|
<!-- <el-table--> |
|
|
|
<!-- :height="300"--> |
|
|
|
<!-- :data="agentList"--> |
|
|
|
<!-- ref="agentTable"--> |
|
|
|
<!-- @row-click="agentClickRow"--> |
|
|
|
<!-- @selection-change="selectionAgent"--> |
|
|
|
<!-- :row-key="getRowKeys"--> |
|
|
|
<!-- border--> |
|
|
|
<!-- v-loading="dataListLoading"--> |
|
|
|
<!-- style="width: 100%;">--> |
|
|
|
<!-- <el-table-column--> |
|
|
|
<!-- type="selection"--> |
|
|
|
<!-- header-align="center"--> |
|
|
|
<!-- align="center"--> |
|
|
|
<!-- :reserve-selection="true"--> |
|
|
|
<!-- width="50">--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<!-- <el-table-column--> |
|
|
|
<!-- v-for="(item,index) in agentColumnList" :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>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- <el-footer style="height:40px;margin-top: 20px;text-align:center">--> |
|
|
|
<!-- <el-button type="primary" @click="confirmAgent()">确认</el-button>--> |
|
|
|
<!-- <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="agentModelFlag" width="900px"> |
|
|
|
<div style="font-size: 12px"> |
|
|
|
@ -573,6 +583,7 @@ |
|
|
|
<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"> |
|
|
|
@ -698,7 +709,8 @@ |
|
|
|
getManufacturerListBy, // 根据条件查询可选制造商 |
|
|
|
addPartManufacturer, // 新增物料制造商 |
|
|
|
deletePartManufacturer, // 删除物料制造商 |
|
|
|
deleteManufacturer // 删除物料制造商(单删) |
|
|
|
deleteManufacturer, // 删除物料制造商(单删) |
|
|
|
commitItemValue, // 修改物料属性值 |
|
|
|
} from '@/api/part/partInformation.js' |
|
|
|
import { |
|
|
|
getFileContentList, // 获取物料单附件列表 |
|
|
|
@ -746,6 +758,7 @@ |
|
|
|
pageSize: 50, |
|
|
|
totalPage: 0, |
|
|
|
selectedDataNum: 0, |
|
|
|
tempCodeNo: '', |
|
|
|
// 条件查询 |
|
|
|
searchData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
@ -829,6 +842,7 @@ |
|
|
|
// ======== 数据列表 ======== |
|
|
|
dataList: [], |
|
|
|
partItemList: [], |
|
|
|
updatePartItemList: [], |
|
|
|
partAgentList: [], |
|
|
|
partManufacturerList: [], |
|
|
|
fileContentList: [], |
|
|
|
@ -1372,6 +1386,62 @@ |
|
|
|
columnWidth: 70, |
|
|
|
}, |
|
|
|
], |
|
|
|
updateColumnItemList: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001, |
|
|
|
serialNumber: '104001Table6PropertiesItemID', |
|
|
|
tableId: "104001Table6", |
|
|
|
tableName: "物料属性表", |
|
|
|
columnProp: 'propertiesItemNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '属性编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 90, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001, |
|
|
|
serialNumber: '104001Table6PropertiesItemDesc', |
|
|
|
tableId: "104001Table6", |
|
|
|
tableName: "物料属性表", |
|
|
|
columnProp: 'itemDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '属性名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 90, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001, |
|
|
|
serialNumber: '104001Table6ValueType', |
|
|
|
tableId: "104001Table6", |
|
|
|
tableName: "物料属性表", |
|
|
|
columnProp: 'valueType', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '属性类型', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 70, |
|
|
|
}, |
|
|
|
], |
|
|
|
columnAgentList: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
@ -1497,8 +1567,8 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001, |
|
|
|
serialNumber: '104001Table3ManufacturerId', |
|
|
|
tableId: "104001Table3", |
|
|
|
serialNumber: '104001Table5ManufacturerId', |
|
|
|
tableId: "104001Table5", |
|
|
|
tableName: "物料制造商表", |
|
|
|
columnProp: 'manufacturerId', |
|
|
|
headerAlign: "center", |
|
|
|
@ -1514,8 +1584,8 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001, |
|
|
|
serialNumber: '104001Table3ManufacturerName', |
|
|
|
tableId: "104001Table3", |
|
|
|
serialNumber: '104001Table5ManufacturerName', |
|
|
|
tableId: "104001Table5", |
|
|
|
tableName: "物料制造商表", |
|
|
|
columnProp: 'manufacturerName', |
|
|
|
headerAlign: "center", |
|
|
|
@ -1531,8 +1601,8 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001, |
|
|
|
serialNumber: '104001Table3Active', |
|
|
|
tableId: '104001Table3', |
|
|
|
serialNumber: '104001Table5Active', |
|
|
|
tableId: '104001Table5', |
|
|
|
tableName: '物料制造商表', |
|
|
|
columnProp: 'active', |
|
|
|
headerAlign: 'center', |
|
|
|
@ -1548,8 +1618,8 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001, |
|
|
|
serialNumber: '104001Table3CreateDate', |
|
|
|
tableId: '104001Table3', |
|
|
|
serialNumber: '104001Table5CreateDate', |
|
|
|
tableId: '104001Table5', |
|
|
|
tableName: '物料制造商表', |
|
|
|
columnProp: 'createDate', |
|
|
|
headerAlign: 'center', |
|
|
|
@ -1565,8 +1635,8 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001, |
|
|
|
serialNumber: '104001Table3CreateBy', |
|
|
|
tableId: '104001Table3', |
|
|
|
serialNumber: '104001Table5CreateBy', |
|
|
|
tableId: '104001Table5', |
|
|
|
tableName: '物料制造商表', |
|
|
|
columnProp: 'createBy', |
|
|
|
headerAlign: 'center', |
|
|
|
@ -1582,8 +1652,8 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001, |
|
|
|
serialNumber: '104001Table3UpdateDate', |
|
|
|
tableId: '104001Table3', |
|
|
|
serialNumber: '104001Table5UpdateDate', |
|
|
|
tableId: '104001Table5', |
|
|
|
tableName: '物料制造商表', |
|
|
|
columnProp: 'updateDate', |
|
|
|
headerAlign: 'center', |
|
|
|
@ -1599,8 +1669,8 @@ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001, |
|
|
|
serialNumber: '104001Table3UpdateBy', |
|
|
|
tableId: '104001Table3', |
|
|
|
serialNumber: '104001Table5UpdateBy', |
|
|
|
tableId: '104001Table5', |
|
|
|
tableName: '物料制造商表', |
|
|
|
columnProp: 'updateBy', |
|
|
|
headerAlign: 'center', |
|
|
|
@ -1845,9 +1915,11 @@ |
|
|
|
itemModalDisableFlag: false, |
|
|
|
itemModalFlag: false, |
|
|
|
agentModelFlag: false, |
|
|
|
manufacturerModelFlag: false |
|
|
|
manufacturerModelFlag: false, |
|
|
|
updateItemModelFlag: false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
mounted () { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight / 2 - 30 |
|
|
|
@ -1855,10 +1927,80 @@ |
|
|
|
this.secondHeight = window.innerHeight / 2 - 206 |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
created () { |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
focusNextInput (index, type) { |
|
|
|
let aaa = '' |
|
|
|
if (this.updatePartItemList.length - 1 === index) { |
|
|
|
aaa = `${type}0` |
|
|
|
} else { |
|
|
|
aaa = `${type}${index + 1}` |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[aaa].focus() |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 编辑物料属性 |
|
|
|
updateItemValue () { |
|
|
|
let tempData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
partNo: this.partCurrentRow.partNo, |
|
|
|
codeNo: this.partCurrentRow.codeNo, |
|
|
|
recordType: 'B' |
|
|
|
} |
|
|
|
getPartItem(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.updatePartItemList = data.rows |
|
|
|
this.updateItemModelFlag = true |
|
|
|
} else { |
|
|
|
this.updatePartItemList = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 确认修改物料属性 |
|
|
|
commitItemValue () { |
|
|
|
let tempData = { |
|
|
|
itemList: JSON.parse(JSON.stringify(this.updatePartItemList)) |
|
|
|
} |
|
|
|
commitItemValue(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getPartItem() |
|
|
|
this.updateItemModelFlag = false |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => {} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// ======= 正则校验 ======= |
|
|
|
handleInput (value, type) { |
|
|
|
// 大于等于0,且只能输入4位小数 |
|
|
|
let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1') |
|
|
|
if (val === null || val === undefined || val === '') { |
|
|
|
val = 0 |
|
|
|
} |
|
|
|
if (type === 1) { |
|
|
|
this.modalData.weightNet = val |
|
|
|
} else if (type === 2) { |
|
|
|
this.modalData.volumeNet = val |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// ======== 分页相关方法 ======== |
|
|
|
/** |
|
|
|
* 每页数 |
|
|
|
@ -2750,6 +2892,7 @@ |
|
|
|
*/ |
|
|
|
getBaseList (val, type) { |
|
|
|
this.tagNo = val |
|
|
|
this.tempCodeNo = this.modalData.codeNo |
|
|
|
this.$nextTick(() => { |
|
|
|
let strVal = '' |
|
|
|
if (val === 107) { |
|
|
|
@ -2804,8 +2947,17 @@ |
|
|
|
this.modalData.manufacturerId = val.manufacturer_id |
|
|
|
this.modalData.manufacturerName = val.manufacturer_name |
|
|
|
} else if (this.tagNo === 20) { |
|
|
|
if (val.Code_no != this.tempCodeNo) { |
|
|
|
this.$confirm(`更换属性模板将替换下方物料属性数据,请确认?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.modalData.codeNo = val.Code_no |
|
|
|
this.$set(this.modalData, 'codeDesc', val.Code_desc) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -2821,10 +2973,11 @@ |
|
|
|
}) |
|
|
|
return this.resultList |
|
|
|
}, |
|
|
|
startDownload () { |
|
|
|
}, |
|
|
|
finishDownload () { |
|
|
|
}, |
|
|
|
|
|
|
|
startDownload () {}, |
|
|
|
|
|
|
|
finishDownload () {}, |
|
|
|
|
|
|
|
fields () { |
|
|
|
let json = '{' |
|
|
|
this.columnList.forEach((item, index) => { |
|
|
|
@ -2850,5 +3003,8 @@ |
|
|
|
/deep/ .customer-tab .el-tabs__content { |
|
|
|
height: 294px; |
|
|
|
} |
|
|
|
.numInput /deep/ .el-input__inner{ |
|
|
|
text-align: right; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|