Browse Source

2023-12-25 修改

master
fengyuan_yang 2 years ago
parent
commit
3378f6e7b4
  1. 132
      src/views/modules/part/bomManagement.vue
  2. 307
      src/views/modules/part/partInformation.vue
  3. 132
      src/views/modules/part/routingManagement.vue

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

@ -1694,75 +1694,79 @@ export default {
* 新增编辑模态框关闭
*/
closeModal () {
let tempArr = []
tempArr.push(this.modalData)
if (this.modalData.flag === '1') {
this.$confirm(`是否不保存且删除该条BOM记录?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
informationList: tempArr
}
bomManagementDelete(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
} else {
this.modalFlag = false
}
// let tempArr = []
// tempArr.push(this.modalData)
// if (this.modalData.flag === '1') {
// this.$confirm(`BOM?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// let tempData = {
// informationList: tempArr
// }
// bomManagementDelete(tempData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.modalFlag = false
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {}
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// } else {
// this.modalFlag = false
// }
this.getDataList()
this.modalFlag = false
},
/**
* 新增编辑模态框关闭
*/
closeModalX (done) {
let tempArr = []
tempArr.push(this.modalData)
if (this.modalData.flag === '1') {
this.$confirm(`是否不保存且删除该条BOM记录?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
informationList: tempArr
}
bomManagementDelete(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
done()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
} else {
done()
}
// let tempArr = []
// tempArr.push(this.modalData)
// if (this.modalData.flag === '1') {
// this.$confirm(`BOM?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// let tempData = {
// informationList: tempArr
// }
// bomManagementDelete(tempData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// done()
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {}
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// } else {
// done()
// }
this.getDataList()
done()
},
/**
* bom删除

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

@ -2,12 +2,18 @@
<div class="mod-config">
<!-- 查询条件 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'料编码'">
<el-form-item :label="'料编码'">
<el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'ERP物料编码'">
<el-input v-model="searchData.erpPartNo" clearable style="width: 120px"></el-input>
<el-form-item :label="'物料描述'">
<el-input v-model="searchData.partDesc" clearable style="width: 210px"></el-input>
</el-form-item>
<el-form-item :label="'物料规格型号'">
<el-input v-model="searchData.spec" clearable style="width: 120px"></el-input>
</el-form-item>
<!-- <el-form-item :label="'ERP物料编码'">-->
<!-- <el-input v-model="searchData.erpPartNo" clearable style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<el-form-item :label="'录入时间'">
<el-date-picker
style="width: 120px"
@ -29,16 +35,10 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'材料描述'">
<el-input v-model="searchData.partDesc" clearable style="width: 210px"></el-input>
</el-form-item>
<el-form-item :label="'材料规格型号'">
<el-input v-model="searchData.spec" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
<el-button type="primary" @click="delModal()">删除</el-button>
<!-- <el-button type="primary" @click="delModal()">删除</el-button>-->
<download-excel
:fields="fields()"
:data="exportData"
@ -56,7 +56,7 @@
</el-form-item>
</el-form>
<!-- 料列表 -->
<!-- 料列表 -->
<el-table
:height="height"
:data="dataList"
@ -114,80 +114,97 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 料新增/编辑模态框 -->
<el-dialog :title="modalData.title" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px">
<!-- 料新增/编辑模态框 -->
<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" style="width: 221px"></el-input>
<el-form-item label="物料编码" prop="partNo" :rules="rules.partNo">
<el-input v-model="modalData.partNo" clearable style="width: 120px"></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>
</el-form-item>
<el-form-item label="规格型号">
<el-input v-model="modalData.spec" clearable style="width: 205px"></el-input>
</el-form-item>
<el-form-item label="材料描述" prop="partDesc" :rules="rules.partDesc">
<el-input v-model="modalData.partDesc" style="width: 221px"></el-input>
<el-form-item label="物料类别" prop="partType" :rules="rules.partType">
<el-select v-model="modalData.partType" style="width: 160px">
<el-option label="Manufactured" value="Manufactured"></el-option>
<el-option label="Manufactured recipe" value="Manufactured recipe"></el-option>
<el-option label="Purchase raw" value="Purchase raw"></el-option>
<el-option label="Purchased" value="Purchased"></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否在用" prop="active" :rules="rules.active">
<el-select v-model="modalData.active" style="width: 60px">
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</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="spec" :rules="rules.spec">
<el-input v-model="modalData.spec" style="width: 221px"></el-input>
<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.umName" style="width: 221px"></el-input>
<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>
<el-input v-model="modalData.familyName" style="width: 221px"></el-input>
<span slot="label" @click="getBaseList(108)"><a herf="#">物料分类</a></span>
<el-input v-model="modalData.familyId" style="width: 120px"></el-input>
<el-input v-model="modalData.familyName" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item prop="groupName" :rules="rules.groupName">
<span slot="label" @click="getBaseList(109)"><a herf="#">材料分组</a></span>
<el-input v-model="modalData.groupName" style="width: 221px"></el-input>
<span slot="label" @click="getBaseList(109)"><a herf="#">物料分组</a></span>
<el-input v-model="modalData.groupId" style="width: 120px"></el-input>
<el-input v-model="modalData.groupName" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item>
<span slot="label" @click="getBaseList(110)"><a herf="#">商品组1</a></span>
<el-input v-model="modalData.productGroupName1" style="width: 221px"></el-input>
<el-input v-model="modalData.productGroupId1" style="width: 120px"></el-input>
<el-input v-model="modalData.productGroupName1" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item>
<span slot="label" @click="getBaseList(111)"><a herf="#">商品组2</a></span>
<el-input v-model="modalData.productGroupName2" style="width: 221px"></el-input>
<el-input v-model="modalData.productGroupId2" style="width: 120px"></el-input>
<el-input v-model="modalData.productGroupName2" 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>
<span slot="label" @click="getBaseList(112)"><a herf="#">商品组3</a></span>
<el-input v-model="modalData.productGroupName3" style="width: 221px"></el-input>
<el-form-item prop="productGroupId3" :rules="rules.productGroupId3">
<span slot="label" @click="getBaseList(112)"><a herf="#">会计组</a></span>
<el-input v-model="modalData.productGroupId3" style="width: 120px"></el-input>
<el-input v-model="modalData.productGroupName3" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item>
<span slot="label" @click="getBaseList(113)"><a herf="#">商品组4</a></span>
<el-input v-model="modalData.productGroupName4" style="width: 221px"></el-input>
<el-form-item prop="productGroupId4" :rules="rules.productGroupId4">
<span slot="label" @click="getBaseList(113)"><a herf="#">计划员</a></span>
<el-input v-model="modalData.productGroupId4" style="width: 120px"></el-input>
<el-input v-model="modalData.productGroupName4" disabled style="width: 330px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="codeDesc" :rules="rules.codeDesc">
<span slot="label" @click="getBaseList(20)"><a herf="#">属性模板</a></span>
<el-input v-model="modalData.codeDesc" style="width: 221px"></el-input>
</el-form-item>
<el-form-item prop="manufacturerName" :rules="rules.manufacturerName">
<span slot="label" @click="getBaseList(114)"><a herf="#">制造商</a></span>
<el-input v-model="modalData.manufacturerName" style="width: 221px"></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="active" :rules="rules.active">
<el-select v-model="modalData.active" style="width: 221px">
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item prop="agentName" :rules="rules.agentName">-->
<!-- <span slot="label" @click="getAgentList()"><a>代理商</a></span>-->
<!-- <el-input v-model="modalData.agentName" style="width: 221px"></el-input>-->
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item prop="manufacturerName" :rules="rules.manufacturerName">-->
<!-- <span slot="label" @click="getBaseList(114)"><a herf="#">制造商</a></span>-->
<!-- <el-input v-model="modalData.manufacturerName" style="width: 221px"></el-input>-->
<!-- </el-form-item>-->
</el-form>
<!-- </el-form>-->
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">-->
<!--&lt;!&ndash; <el-form-item prop="agentName" :rules="rules.agentName">&ndash;&gt;-->
<!--&lt;!&ndash; <span slot="label" @click="getAgentList()"><a>代理商</a></span>&ndash;&gt;-->
<!--&lt;!&ndash; <el-input v-model="modalData.agentName" style="width: 221px"></el-input>&ndash;&gt;-->
<!--&lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- </el-form>-->
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="备注">
<el-input type="textarea" v-model="modalData.remark" :rows="3" resize='none' show-word-limit style="width: 456px;height: 60px"></el-input>
<el-input type="textarea" v-model="modalData.remark" :rows="3" resize='none' show-word-limit style="width: 921px;height: 60px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:35px;margin-top: 55px;text-align:center">
@ -198,8 +215,8 @@
<!-- 页签 -->
<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-tab-pane label="料属性" name="part_item">
<el-table
:data="partItemList"
:height="secondHeight"
@ -315,7 +332,7 @@
</el-tab-pane>
</el-tabs>
<!-- 料属性值编辑模态框 -->
<!-- 料属性值编辑模态框 -->
<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;">
<el-form-item label="属性编码:">
@ -507,21 +524,21 @@
<script>
import {
partInformationSearch, //
partInformationSave, //
partInformationEdit, //
partInformationDelete, //
getPartItem, //
partInformationSearch, //
partInformationSave, //
partInformationEdit, //
partInformationDelete, //
getPartItem, //
savePartItemValue, //
getAgentList, //
getPartAgent, //
getPartAgent, //
getAgentListBy, //
addPartAgent, //
deletePartAgent, //
deleteAgent // ()
} from '@/api/part/partInformation.js'
import {
getFileContentList, //
getFileContentList, //
deleteQuotationFile, //
downLoadQuotationFile //
} from '@/api/quotation/quotationInformation.js'
@ -653,11 +670,11 @@
functionId: 104001,
serialNumber: '104001Table1PartNo',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'partNo',
headerAlign: 'center',
align: 'left',
columnLabel: '料编码',
columnLabel: '料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -671,7 +688,7 @@
// functionId: 104001,
// serialNumber: '104001Table1ERPPartNo',
// tableId: '104001Table1',
// tableName: '',
// tableName: '',
// columnProp: 'erpPartNo',
// headerAlign: 'center',
// align: 'left',
@ -689,11 +706,11 @@
functionId: 104001,
serialNumber: '104001Table1PartDesc',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'partDesc',
headerAlign: 'center',
align: 'left',
columnLabel: '料描述',
columnLabel: '料描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -707,7 +724,7 @@
functionId: 104001,
serialNumber: '104001Table1Spec',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'spec',
headerAlign: 'center',
align: 'center',
@ -725,7 +742,7 @@
functionId: 104001,
serialNumber: '104001Table1UmId',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'umName',
headerAlign: 'center',
align: 'left',
@ -743,11 +760,11 @@
functionId: 104001,
serialNumber: '104001Table1FamilyName',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'familyName',
headerAlign: 'center',
align: 'left',
columnLabel: '料分类1',
columnLabel: '料分类1',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -761,11 +778,11 @@
functionId: 104001,
serialNumber: '104001Table1GroupName',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'groupName',
headerAlign: 'center',
align: 'left',
columnLabel: '料分类2',
columnLabel: '料分类2',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -779,7 +796,7 @@
functionId: 104001,
serialNumber: '104001Table1OtherGroup1',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'productGroupName1',
headerAlign: 'center',
align: 'left',
@ -797,7 +814,7 @@
functionId: 104001,
serialNumber: '104001Table1OtherGroup2',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'productGroupName2',
headerAlign: 'center',
align: 'left',
@ -815,7 +832,7 @@
functionId: 104001,
serialNumber: '104001Table1OtherGroup3',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'productGroupName3',
headerAlign: 'center',
align: 'left',
@ -833,7 +850,7 @@
functionId: 104001,
serialNumber: '104001Table1OtherGroup4',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'productGroupName4',
headerAlign: 'center',
align: 'left',
@ -851,7 +868,7 @@
functionId: 104001,
serialNumber: '104001Table1ItemNo',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'codeDesc',
headerAlign: 'center',
align: 'left',
@ -869,7 +886,7 @@
functionId: 104001,
serialNumber: '104001Table1ManufacturerName',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'manufacturerName',
headerAlign: 'center',
align: 'left',
@ -887,7 +904,7 @@
functionId: 104001,
serialNumber: '104001Table1AgentName',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'agentName',
headerAlign: 'center',
align: 'left',
@ -905,7 +922,7 @@
functionId: 104001,
serialNumber: '104001Table1Remark',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'remark',
headerAlign: 'center',
align: 'left',
@ -923,7 +940,7 @@
functionId: 104001,
serialNumber: '104001Table1Active',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'active',
headerAlign: 'center',
align: 'center',
@ -941,7 +958,7 @@
functionId: 104001,
serialNumber: '104001Table1CreateDate',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
@ -959,7 +976,7 @@
functionId: 104001,
serialNumber: '104001Table1CreateBy',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
@ -977,7 +994,7 @@
functionId: 104001,
serialNumber: '104001Table1UpdateDate',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
@ -995,7 +1012,7 @@
functionId: 104001,
serialNumber: '104001Table1UpdateBy',
tableId: '104001Table1',
tableName: '料信息表',
tableName: '料信息表',
columnProp: 'updateBy',
headerAlign: 'center',
align: 'center',
@ -1015,7 +1032,7 @@
functionId: 104001,
serialNumber: '104001Table2PropertiesItemID',
tableId: "104001Table2",
tableName: "料属性表",
tableName: "料属性表",
columnProp: 'propertiesItemNo',
headerAlign: "center",
align: "center",
@ -1033,7 +1050,7 @@
functionId: 104001,
serialNumber: '104001Table2PropertiesItemDesc',
tableId: "104001Table2",
tableName: "料属性表",
tableName: "料属性表",
columnProp: 'itemDesc',
headerAlign: "center",
align: "center",
@ -1051,7 +1068,7 @@
functionId: 104001,
serialNumber: '104001Table2ValueType',
tableId: "104001Table2",
tableName: "料属性表",
tableName: "料属性表",
columnProp: 'valueType',
headerAlign: "center",
align: "center",
@ -1069,7 +1086,7 @@
functionId: 104001,
serialNumber: '104001Table2ValueChooseFlag',
tableId: "104001Table2",
tableName: "料属性表",
tableName: "料属性表",
columnProp: 'textValue',
headerAlign: "center",
align: "center",
@ -1087,7 +1104,7 @@
functionId: 104001,
serialNumber: '104001Table2ValueChooseFlag',
tableId: "104001Table2",
tableName: "料属性表",
tableName: "料属性表",
columnProp: 'numValue',
headerAlign: "center",
align: "center",
@ -1107,7 +1124,7 @@
functionId: 104001,
serialNumber: '104001Table3AgentId',
tableId: "104001Table3",
tableName: "料代理商表",
tableName: "料代理商表",
columnProp: 'agentId',
headerAlign: "center",
align: "center",
@ -1124,7 +1141,7 @@
functionId: 104001,
serialNumber: '104001Table3AgentName',
tableId: "104001Table3",
tableName: "料代理商表",
tableName: "料代理商表",
columnProp: 'agentName',
headerAlign: "center",
align: "center",
@ -1141,7 +1158,7 @@
functionId: 104001,
serialNumber: '104001Table3Active',
tableId: '104001Table3',
tableName: '料代理商表',
tableName: '料代理商表',
columnProp: 'active',
headerAlign: 'center',
align: 'center',
@ -1158,7 +1175,7 @@
functionId: 104001,
serialNumber: '104001Table3CreateDate',
tableId: '104001Table3',
tableName: '料代理商表',
tableName: '料代理商表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
@ -1175,7 +1192,7 @@
functionId: 104001,
serialNumber: '104001Table3CreateBy',
tableId: '104001Table3',
tableName: '料代理商表',
tableName: '料代理商表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
@ -1192,7 +1209,7 @@
functionId: 104001,
serialNumber: '104001Table3UpdateDate',
tableId: '104001Table3',
tableName: '料代理商表',
tableName: '料代理商表',
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
@ -1209,7 +1226,7 @@
functionId: 104001,
serialNumber: '104001Table3UpdateBy',
tableId: '104001Table3',
tableName: '料代理商表',
tableName: '料代理商表',
columnProp: 'updateBy',
headerAlign: 'center',
align: 'center',
@ -1334,13 +1351,6 @@
trigger: 'change'
}
],
spec: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
umName: [
{
required: true,
@ -1390,6 +1400,27 @@
trigger: 'change'
}
],
partType: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
productGroupId3: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
productGroupId4: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
},
// ======== ========
partSelections: [],
@ -1481,7 +1512,7 @@
// ======== ========
/**
* 查询料属性
* 查询料属性
*/
getPartItem () {
let tempData = {
@ -1499,7 +1530,7 @@
})
},
/**
* 查询料代理商
* 查询料代理商
*/
getPartAgent () {
let tempData = {
@ -1545,18 +1576,18 @@
// ======== / ========
/**
* 料信息新增模态框
* 料信息新增模态框
*/
addModal () {
this.modalData = {
flag: '1',
title: '料新增',
title: '料新增',
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
spec: '',
partTypeDb: '',
partType: '',
partType: 'Manufactured',
familyId: '',
familyName: '',
groupId: '',
@ -1588,13 +1619,13 @@
this.modalFlag = true
},
/**
* 料信息编辑模态框
* 料信息编辑模态框
* @param row
*/
updateModal (row) {
this.modalData = {
flag: '2',
title: '料编辑',
title: '料编辑',
site: row.site,
partNo: row.partNo,
partDesc: row.partDesc,
@ -1807,19 +1838,27 @@
// ======== // ========
/**
* 料信息新增/编辑
* 料信息新增/编辑
*/
saveData () {
if (this.modalData.partNo === '' || this.modalData.partNo == null) {
this.$message.warning('请填写料编码!')
this.$message.warning('请填写料编码!')
return
}
if (this.modalData.partDesc === '' || this.modalData.partDesc == null) {
this.$message.warning('请填写材料描述!')
this.$message.warning('请填写物料描述!')
return
}
if (this.modalData.partType === '' || this.modalData.partType == null) {
this.$message.warning('请选择物料类别!')
return
}
if (this.modalData.active === '' || this.modalData.active == null) {
this.$message.warning('请选择是否在用!')
return
}
if (this.modalData.spec === '' || this.modalData.spec == null) {
this.$message.warning('请填写规格型号!')
if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
this.$message.warning('请选择属性模板!')
return
}
if (this.modalData.umId === '' || this.modalData.umId == null) {
@ -1834,22 +1873,14 @@
this.$message.warning('请选择分组!')
return
}
if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
this.$message.warning('请选择属性模板!')
if (this.modalData.productGroupId3 === '' || this.modalData.productGroupId3 == null) {
this.$message.warning('请选择会计组!')
return
}
if (this.modalData.manufacturerId === '' || this.modalData.manufacturerId == null) {
this.$message.warning('请选择制造商!')
return
}
if (this.modalData.active === '' || this.modalData.active == null) {
this.$message.warning('请选择是否在用!')
if (this.modalData.productGroupId4 === '' || this.modalData.productGroupId4 == null) {
this.$message.warning('请选择计划员!')
return
}
// if (this.modalData.agentId === '' || this.modalData.agentId == null) {
// this.$message.warning('')
// return
// }
if (this.modalData.flag === '1') {
partInformationSave(this.modalData).then(({data}) => {
if (data && data.code === 0) {
@ -1887,14 +1918,14 @@
}
},
/**
* 料信息删除
* 料信息删除
*/
delModal () {
if(this.partSelections.length === 0){
this.$message.warning('请勾选要删除的料信息!')
this.$message.warning('请勾选要删除的料信息!')
return
}
this.$confirm(`是否删除这 `+ this.partSelections.length +`料信息?`, '提示', {
this.$confirm(`是否删除这 `+ this.partSelections.length +`料信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -1924,7 +1955,7 @@
// ======== ========
/**
* 单机选中料信息
* 单机选中料信息
* @param row
*/
partClickRow (row) {
@ -1932,7 +1963,7 @@
this.partCurrentRow = JSON.parse(JSON.stringify(row))
},
/**
* 复选料信息
* 复选料信息
* @param val
*/
selectionPart (val) {
@ -2003,7 +2034,7 @@
// ======== ========
/**
* 获取料附件列表
* 获取料附件列表
*/
getFileContentData () {
let currentData = {
@ -2023,7 +2054,7 @@
*/
uploadFile () {
let currentData = {
titleCon: '料附件上传',
titleCon: '料附件上传',
site: this.$store.state.user.site,
createBy: this.$store.state.user.name,
partNo: this.partCurrentRow.partNo

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

@ -1678,75 +1678,79 @@ export default {
* 新增编辑模态框关闭
*/
closeModal () {
let tempArr = []
tempArr.push(this.modalData)
if (this.modalData.flag === '1') {
this.$confirm(`是否不保存且删除该条Routing记录?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
informationList: tempArr
}
routingManagementDelete(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
} else {
this.modalFlag = false
}
// let tempArr = []
// tempArr.push(this.modalData)
// if (this.modalData.flag === '1') {
// this.$confirm(`Routing?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// let tempData = {
// informationList: tempArr
// }
// routingManagementDelete(tempData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// this.modalFlag = false
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {}
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// } else {
// this.modalFlag = false
// }
this.getDataList()
this.modalFlag = false
},
/**
* 新增编辑模态框关闭
*/
closeModalX (done) {
let tempArr = []
tempArr.push(this.modalData)
if (this.modalData.flag === '1') {
this.$confirm(`是否不保存且删除该条Routing记录?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
informationList: tempArr
}
routingManagementDelete(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
done()
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
} else {
done()
}
// let tempArr = []
// tempArr.push(this.modalData)
// if (this.modalData.flag === '1') {
// this.$confirm(`Routing?`, '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// let tempData = {
// informationList: tempArr
// }
// routingManagementDelete(tempData).then(({data}) => {
// if (data && data.code === 0) {
// this.getDataList()
// done()
// this.$message({
// message: '',
// type: 'success',
// duration: 1500,
// onClose: () => {}
// })
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// }).catch(() => {
// })
// } else {
// done()
// }
this.getDataList()
done()
},
/**
* routing删除

Loading…
Cancel
Save