diff --git a/src/api/chooselist/chooselist.js b/src/api/chooselist/chooselist.js index 75b72c8..6482309 100644 --- a/src/api/chooselist/chooselist.js +++ b/src/api/chooselist/chooselist.js @@ -5,3 +5,5 @@ export const getChooselist = data => createAPI(`/chooselist/getChooselist/${data export const getChooselistData = data => createAPI(`/chooselist/getChooselistData`,'post',data) + +export const chooseList = data => createAPI(`/chooselist/getChooseList`,'post',data) diff --git a/src/api/test/testSoBom.js b/src/api/test/testSoBom.js new file mode 100644 index 0000000..6bebd85 --- /dev/null +++ b/src/api/test/testSoBom.js @@ -0,0 +1,12 @@ +import {createAPI} from "../../utils/httpRequest"; + +/** + * 查询测试产品结构 + * @param data + * @returns {*} + */ +export const selectTestSoBom = (data) => createAPI(`/test/soBom/list`,'post',data) +export const saveTestSoBom = (data) => createAPI(`/test/soBom/save`,'post',data) +export const updateTestSoBom = (data) => createAPI(`/test/soBom/update`,'post',data) +export const removeTestSoBom = (data) => createAPI(`/test/soBom/remove`,'post',data) +export const removeBatchTestSoBom = (data) => createAPI(`/test/soBom/removeBatch`,'post',data) diff --git a/src/views/modules/common/chooseListDemo.vue b/src/views/modules/common/chooseListDemo.vue new file mode 100644 index 0000000..e408efa --- /dev/null +++ b/src/views/modules/common/chooseListDemo.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/src/views/modules/common/numberInput.vue b/src/views/modules/common/numberInput.vue new file mode 100644 index 0000000..969fb3b --- /dev/null +++ b/src/views/modules/common/numberInput.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/src/views/modules/proofing/requestForProofing.vue b/src/views/modules/proofing/requestForProofing.vue index 7a447e9..37816c9 100644 --- a/src/views/modules/proofing/requestForProofing.vue +++ b/src/views/modules/proofing/requestForProofing.vue @@ -188,7 +188,7 @@ 项目编码 - + diff --git a/src/views/modules/quotation/sellForQuotation/quotationDetail.vue b/src/views/modules/quotation/sellForQuotation/quotationDetail.vue index 258856c..118789a 100644 --- a/src/views/modules/quotation/sellForQuotation/quotationDetail.vue +++ b/src/views/modules/quotation/sellForQuotation/quotationDetail.vue @@ -975,18 +975,18 @@ :visible.sync="partDialogFlag"> - + - + - + 查 询 @@ -3416,7 +3416,7 @@ export default { this.computePartQuotationUnitCost(this.quotationPart); this.partDialogFlag = false; }, - // 项目材料双击事件 + // 项目物料双击事件 dblClickProjectPartTable(row){ row = JSON.parse(JSON.stringify(row)); this.insertQuotationDetail.productNo = row.testPartNo; @@ -3440,7 +3440,7 @@ export default { this.componentPartModelFlag = false }, // =============================================输入框输入事件======================================================= - // 计算材料总成本 + // 计算物料总成本 computeQuotationPartCost(){ let amount = this.quotationPartFormTable.quotationPartList.reduce((total,currentValue)=>{ return total + new Decimal(currentValue.quotationUnitCost).toNumber(); @@ -3467,7 +3467,7 @@ export default { }, // 计算按钮 adjustCost(){ - this.computeQuotationPartCost();// 计算材料总成本 + this.computeQuotationPartCost();// 计算物料总成本 this.computeQuotationToolCost();//计算工具成本 this.computeQuotationRoutingCost();//计算工艺成本 this.quotationDetailData.adjustPartCost = new Decimal(this.quotationDetailData.computePartCost).toSignificantDigits().toNumber(); @@ -3514,7 +3514,7 @@ export default { this.quotationDetailData.detailTotalCost = this.quotationDetailData.detailTotalCost.add(new Decimal(this.quotationDetailData.detailManageCost)).toSignificantDigits().toNumber(); }, /** - * 计算材料报价单位成本 + * 计算物料报价单位成本 * @param row 计算对象 */ computePartQuotationUnitCost(row){ @@ -3695,7 +3695,7 @@ export default { for (let filed in objects) { let tableName = filed.split(".")[0]; filed = filed.split(".")[2]; - tableName = tableName === "quotationToolList" ? "工具" : tableName === "quotationRoutingList" ? "工艺" : "材料"; + tableName = tableName === "quotationToolList" ? "工具" : tableName === "quotationRoutingList" ? "工艺" : "物料"; for (let i = 0; i < labels.length; i++) { let quotationToolColumn = labels[i]; if (quotationToolColumn.label === filed) { diff --git a/src/views/modules/sys/dict-data-select.vue b/src/views/modules/sys/dict-data-select.vue index ab71d48..b748f8a 100644 --- a/src/views/modules/sys/dict-data-select.vue +++ b/src/views/modules/sys/dict-data-select.vue @@ -24,6 +24,10 @@ export default { useDefaultValue:{ type:Boolean, default:true, + }, + useSite:{ + type:Boolean, + default:true, } }, data () { @@ -48,7 +52,7 @@ export default { async initOption () { // 组合查询条件 let params = { - site:this.$store.state.user.site, + site:this.useSite?this.$store.state.user.site:"*", dictType:this.dictType } try { diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue index ca5d507..efc230c 100644 --- a/src/views/modules/test/requestForTest.vue +++ b/src/views/modules/test/requestForTest.vue @@ -140,7 +140,7 @@ - + @@ -239,51 +239,77 @@
- - - - - - - - - 查询 - - - - - - - - - + + + + + + + + + + + + + + + + + 查询 + + + + + 下一步 + + + + + + + + + + + + + + + + +
+ 新增 + 删除 +
+
+
保存 @@ -556,6 +582,9 @@
+ + + @@ -861,8 +890,16 @@ import Chooselist from '@/views/modules/common/Chooselist' import testUploadFile from "./test_upload_file" import DictDataSelect from "../sys/dict-data-select.vue"; + import { + selectTestSoBom, + saveTestSoBom, + removeTestSoBom, + updateTestSoBom + } from "../../../api/test/testSoBom"; + import TestTable from "./testSoBom/testTable.vue"; export default { components: { + TestTable, DictDataSelect, Chooselist, testUploadFile @@ -886,6 +923,9 @@ }, data () { return { + testSoBomList:[], + activeTab:'part', + activeTabList:['part'], // 导出 exportData: [], exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'), @@ -1524,7 +1564,7 @@ columnProp: 'testPartNo', headerAlign: 'center', align: 'center', - columnLabel: '产品编码', + columnLabel: '物料编码', columnHidden: false, columnImage: false, columnSortable: false, @@ -1542,7 +1582,7 @@ columnProp: 'partDesc', headerAlign: 'center', align: 'center', - columnLabel: '产品名称', + columnLabel: '物料名称', columnHidden: false, columnImage: false, columnSortable: false, @@ -1559,7 +1599,7 @@ columnProp: 'partType', headerAlign: 'center', align: 'center', - columnLabel: '产品类型', + columnLabel: '物料类型', columnHidden: false, columnImage: false, columnSortable: false, @@ -1744,7 +1784,8 @@ * @param row */ projectPartClickRow (row) { - if (this.modalData.flag === '1'){ + if (this.modalData.flag === '1' && this.activeTabList.length === 1){ + this.$refs.projectPartTable.clearSelection(); this.$refs.projectPartTable.toggleRowSelection(row); this.confirmProjectPart(); } @@ -1946,6 +1987,10 @@ nextToDo: row.nextToDo, updateBy: this.$store.state.user.name } + this.activeTabList = ['part','product','process'] + this.$nextTick(()=>{ + this.$refs.dialogSoBom.clearTable(); + }) this.modalDisableFlag = true this.modalFlag = true }, @@ -2074,14 +2119,14 @@ saveTest(){ testInformationSave(this.modalData).then(({data}) => { if (data && data.code === 0) { - this.getDataList() - this.modalFlag = false - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => {} - }) + this.getDataList(); + this.activeTabList = ['part','product','process'] + this.activeTab = 'product' + this.modalData.testNo = data.row + this.testSoBomList = [] + // this.modalFlag = false + this.$message.success("操作成功") + this.selectTestSoBom(); } else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -2152,6 +2197,12 @@ // this.$refs.testTable.toggleRowSelection(row) this.testCurrentRow = JSON.parse(JSON.stringify(row)) this.testDetailData = JSON.parse(JSON.stringify(row)) + if (row){ + this.$nextTick(()=>{ + this.$refs.tabSoBom.clearTable(); + }) + this.selectTestSoBom() + } }, /** * 复选报价信息 @@ -2555,9 +2606,11 @@ updateDate: '', updateBy: '' } + this.activeTab = 'part'; + this.activeTabList = ['part'] }, checkSelectable(row,index){ - if (this.modalData.flag === '1'){ + if (this.modalData.flag === '1' && this.activeTabList.length === 1){ return true }else { return false @@ -2597,6 +2650,21 @@ return { 'background-color': '#E8F7F6', cursor: 'pointer' }; } }, + selectTestSoBom(){ + let params = { + testNo:this.modalData.testNo?this.modalData.testNo:this.testCurrentRow.testNo, + site:this.$store.state.user.site + } + selectTestSoBom(params).then(({data})=>{ + if (data && data.code === 0 ){ + this.testSoBomList = data.rows + }else { + this.$message.error(data.msg) + } + }).catch((error)=>{ + this.$message.error(error) + }) + } } } diff --git a/src/views/modules/test/testSoBom/testTable.vue b/src/views/modules/test/testSoBom/testTable.vue new file mode 100644 index 0000000..eccf6b9 --- /dev/null +++ b/src/views/modules/test/testSoBom/testTable.vue @@ -0,0 +1,611 @@ + + + + +