diff --git a/src/api/part/partAccept.js b/src/api/part/partAccept.js new file mode 100644 index 00000000..3fff2c29 --- /dev/null +++ b/src/api/part/partAccept.js @@ -0,0 +1,46 @@ +import request from '@/utils/request' + +//获取配件类型下拉框-三级 +export function getPartType(query) { + return request({ + url: '/material/part_accept/partTypeThree', + method: 'get', + params: query, + }) +} + + // 配件入库API + export function partTypeWarehouse(data) { + return request({ + url: '/material/part_accept/partTypeWarehouse', + method: 'post', + data: data, + }) +} + + // 配件驳回API + export function partTypeReject(data) { + return request({ + url: '/material/part_accept/partTypeReject', + method: 'post', + data: data, + }) +} + + // 外层配件入库API + export function passAll(data) { + return request({ + url: '/material/part_accept/passAll', + method: 'post', + data: data + }) +} + + // 外层配件驳回API + export function rejectAll(data) { + return request({ + url: '/material/part_accept/rejectAll', + method: 'post', + data: data , + }) +} \ No newline at end of file diff --git a/src/api/part/partArrived.js b/src/api/part/partArrived.js new file mode 100644 index 00000000..51852876 --- /dev/null +++ b/src/api/part/partArrived.js @@ -0,0 +1,55 @@ +import request from '@/utils/request' + +//获取配件类型树 +export function getTypeTree(query) { + return request({ + url: '/material/part_arrived/typeTree', + method: 'get', + params: query, + }) +} + +// 配件新购到货-新增 +export function addPartInfo(data) { + return request({ + url: '/material/part_arrived', + method: 'post', + data: data, + }) +} + + //配件新购到货-列表 + export function getListNewBuy(query) { + return request({ + url: '/material/part_arrived/list', + method: 'get', + params: query, + }) + } + +//配件新购到货-列表详情 +export function getPartTypeCheckInfo(query) { + return request({ + url: '/material/part_arrived/getInfo', + method: 'get', + params: query, + }) +} + +// 配件新购到货-编辑 +export function updatePartInfo(data) { + return request({ + url: '/material/part_arrived', + method: 'put', + data: data, + }) +} + +// 配件新购到货--删除 +export function deletePartInfo(data) { + return request({ + url: '/material/part_arrived/delete' , + method: 'post', + data: data, + }) +} \ No newline at end of file diff --git a/src/views/material/part/partAccept/detail.vue b/src/views/material/part/partAccept/detail.vue new file mode 100644 index 00000000..b1c23059 --- /dev/null +++ b/src/views/material/part/partAccept/detail.vue @@ -0,0 +1,558 @@ + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + 新购到货验收 + + + + + 入库 + + + + 驳回 + + + + + + + + + + + + + + + + + + + + + + + 入库 + + + 驳回 + + + + + + + + + + + + + 验收结论: + + + + + 确认 + 取消 + + + + + + + diff --git a/src/views/material/part/partAccept/index.vue b/src/views/material/part/partAccept/index.vue new file mode 100644 index 00000000..f6329c95 --- /dev/null +++ b/src/views/material/part/partAccept/index.vue @@ -0,0 +1,500 @@ + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + 入库 + + + + + + 驳回 + + + + + 导出数据 + + + + + + + + + {{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }} + + + + + + + + + + + + + + + + + + + 查看 + + + 入库 + + + 验收单 + + + + + + + + + + + + + + 机具设备到货验收单 + + + + 单据编号:{{printData.code}} + + + 生产厂家(供应商):{{printData.supplierName}} + + + + 到货日期:{{printData.arrivalDate}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 供应科:{{printData.supplyDept}} + + + + + + 生产技术科:{{printData.productionTechDept}} + + + + + + 库管班:{{printData.warehouseTeam}} + + + + + + + + + + + + + + + diff --git a/src/views/material/part/partArrived/component/addTools.vue b/src/views/material/part/partArrived/component/addTools.vue index 100b83c4..07bb1266 100644 --- a/src/views/material/part/partArrived/component/addTools.vue +++ b/src/views/material/part/partArrived/component/addTools.vue @@ -108,14 +108,14 @@ /> @@ -124,8 +124,8 @@ (scope.row.unitValue==1?scope.row.purchaseNum=Number(v.replace(/[^\d.]/g,'')) : scope.row.purchaseNum=Number(v.replace(/[^\d]/g,'')))" + style="width: 100%" :disabled="scope.row.status!=0" + :min="0" > @@ -139,7 +139,7 @@ v-model="scope.row.purchaseTaxPrice" controls-position="right" style="width: 100%" @blur="scope.row.purchaseTaxPrice = scope.row.purchaseTaxPrice>0? scope.row.purchaseTaxPrice:0" - :min="0" :step="1" :disabled="scope.row.status!=1&&scope.row.status!=12" + :min="0" :step="1" :disabled="scope.row.status!=0" @change="purchaseTaxPriceChange(scope.row,scope.$index)" > @@ -159,18 +159,6 @@ > - - - 0? Number(scope.row.rentPrice.toFixed(2)) :0" - :min="0" :step="1" :disabled="(scope.row.status!=1&&scope.row.status!=12)||scope.row.rentPriceDisabled" - > - - @@ -201,7 +189,7 @@ - + @@ -215,7 +203,7 @@ { + getTypeTree().then((response) => { this.equipmentTypeList = response.data this.equipmentTypeList.forEach((item, index) => { if (item.children && item.children.length > 0) { item.children.forEach((item2, index2) => { if (item2.children && item2.children.length > 0) { item2.children.forEach((item3) => { - if ( - item3.children && - item3.children.length > 0 - ) { - item3.children.forEach((item4) => { - item4.maTypeName = item3.typeName - item4.specificationType = item4.typeName - this.$set(item4, 'purchaseTaxPrice', 0) - this.$set(item4, 'purchasePrice', 0) + item2.children.forEach((item3) => { + item3.maTypeName = item2.partName + item3.specificationType = item3.partName + this.$set(item3, 'purchaseTaxPrice', 0) + this.$set(item3, 'purchasePrice', 0) }) - } }) } }) @@ -495,31 +479,30 @@ export default { }) //反显 let selectList = [] - console.log(this.equipmentList) + console.log(this.equipmentTypeList) this.equipmentList.forEach((e) => { console.log(this.equipmentList) - selectList.push(this.getParentsById(this.equipmentTypeList, e.typeId, e.status)) + selectList.push(this.getParentsById(this.equipmentTypeList, e.partId)) }) this.deviceType = selectList }) }, //树结构数据获取父 - getParentsById(list, id, status) { + getParentsById(list, id) { for (let i in list) { - if (list[i].typeId == id) { + if (list[i].partId == id) { console.log(id) - console.log(status) - if(status!=1&&status!=12){ - list[i].disabled=true - } + // if(status!=1&&status!=12){ + // list[i].disabled=true + // } //查询到就返回该数组对象的value - return [list[i].typeId] + return [list[i].partId] } if (list[i].children) { - let node = this.getParentsById(list[i].children, id, status) + let node = this.getParentsById(list[i].children, id) if (node !== undefined) { //查询到把父节把父节点加到数组前面 - node.unshift(list[i].typeId) + node.unshift(list[i].partId) return node } } @@ -532,11 +515,11 @@ export default { let tempList = [] if (val.length > 0) { const items = val.map((e) => { - return e[3] + return e[2] }) for (let i of items) { for (let z of deviceTypeList) { - if (z.data.typeId === i) { + if (z.data.partId === i) { const obj = JSON.parse(JSON.stringify(z.data)) console.log(z.data) // obj.supplierId = '' @@ -545,15 +528,9 @@ export default { obj.purchaseTaxPrice = 0 obj.purchaseTaxPrice = 0 obj.purchaseNum = 1 - obj.fixCode = "0" - obj.status=1 + obj.status=0 obj.bmFileInfos=[] - if(obj.rentPrice>0){//判断是否有租赁价格:有禁用;无修改; - obj.rentPriceDisabled=true - }else{ - obj.rentPriceDisabled=false - } - tempList.push(obj) + tempList.push(obj); break } } @@ -561,15 +538,15 @@ export default { const newDataListNew = [...this.equipmentList, ...tempList] const map = new Map() for (let item of newDataListNew) { - if (!map.has(item.typeId)) { - map.set(item.typeId, item) + if (!map.has(item.partId)) { + map.set(item.partId, item) } } const newArray = [...map.values()] let newArray_array = [] items.forEach((e) => { newArray.forEach((j) => { - if (e == j.typeId) { + if (e == j.partId) { newArray_array.push(j) } }) @@ -591,17 +568,17 @@ export default { //获取任务详情--- 编辑回显数据 async getTaskInfo() { // this.loading = true; - await getPurchaseCheckInfo({taskId:this.taskId,id:this.id,statusList:[1],taskStage: 1}).then((response) => { - this.maForm = response.data.purchaseCheckInfo - this.maForm.id = response.data.purchaseCheckInfo.id - this.maForm.taskId = response.data.purchaseCheckInfo.taskId - this.maForm.arrivalTime = response.data.purchaseCheckInfo.arrivalTime - this.maForm.supplierId = response.data.purchaseCheckInfo.supplierId - this.maForm.remark = response.data.purchaseCheckInfo.remark - this.maForm.taxRate = response.data.purchaseCheckInfo.taxRate + await getPartTypeCheckInfo({taskId:this.taskId,id:this.id}).then((response) => { + this.maForm = response.data.partTypeCheckInfo + this.maForm.id = response.data.partTypeCheckInfo.id + this.maForm.taskId = response.data.partTypeCheckInfo.taskId + this.maForm.arrivalTime = response.data.partTypeCheckInfo.arrivalTime + this.maForm.supplierId = response.data.partTypeCheckInfo.supplierId + this.maForm.remark = response.data.partTypeCheckInfo.remark + this.maForm.taxRate = response.data.partTypeCheckInfo.taxRate // this.maForm.purchaseNumber = response.data.purchaseNumber // this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime - this.equipmentList = response.data.purchaseCheckDetailsList; + this.equipmentList = response.data.partTypeCheckDetailsList; this.equipmentList.forEach(item=>{ item.rentPriceDisabled=true }) @@ -622,19 +599,16 @@ export default { if (valid) { this.maForm.taskId = this.taskId; let index =this.equipmentList.findIndex(item=>item.purchaseNum==0) - let index1 =this.equipmentList.findIndex(item=>item.rentPrice==0) let index2 =this.equipmentList.findIndex(item=>item.purchaseTaxPrice==0) if(index>-1){ this.$modal.msgError('采购数量不能为0!') - }else if(index1>-1){ - this.$modal.msgError('租赁价格不能为0!') }else{ this.$modal.confirm('是否确认保存当前页面').then(function () {}) .then(() => { if (this.isEdit) { console.log('编辑') this.loading = true - updatePurchaseCheckInfo({purchaseCheckDetailsList: this.equipmentList,purchaseCheckInfo:this.maForm}).then((response) => { + updatePartInfo({partTypeCheckDetailsList: this.equipmentList,partTypeCheckInfo:this.maForm}).then((response) => { if (response.code == 200) { this.$modal.msgSuccess( '编辑成功', @@ -649,7 +623,7 @@ export default { console.log('新增') // console.log(this.equipmentList) this.loading = true - addPurchaseCheckInfo({purchaseCheckDetailsList: this.equipmentList,purchaseCheckInfo:this.maForm}).then((response) => { + addPartInfo({partTypeCheckDetailsList: this.equipmentList,partTypeCheckInfo:this.maForm}).then((response) => { if (response.code == 200) { this.$modal.msgSuccess( '新增成功', @@ -784,13 +758,13 @@ export default { .confirm('是否确认删除所选择的数据项?') .then(() => { this.deviceType.forEach((e, index) => { - if (e[3] === row.typeId) { + if (e[2] === row.partId) { this.deviceType.splice(index, 1) this.propsKey++ } }) this.equipmentList.forEach((item, index) => { - if (item.typeId == row.typeId) { + if (item.partId == row.partId) { this.equipmentList.splice(index, 1) } }) @@ -799,7 +773,7 @@ export default { }, /** 导出按钮操作 */ handleExport() { - this.download('/material/purchase_check_info/exportDetails',{taskId:this.taskId},`新购到货详情_${new Date().getTime()}.xlsx`) + this.download('/material/part_arrived/exportDetails',{taskId:this.taskId},`配件新购到货详情_${new Date().getTime()}.xlsx`) }, }, } @@ -810,7 +784,7 @@ export default { display: none; } - .el-cascader-panel .el-scrollbar:nth-child(4) .el-checkbox { + .el-cascader-panel .el-scrollbar:nth-child(3) .el-checkbox { display: block !important; } } diff --git a/src/views/material/part/partArrived/component/home.vue b/src/views/material/part/partArrived/component/home.vue index c7dc67ac..3c1b8b1c 100644 --- a/src/views/material/part/partArrived/component/home.vue +++ b/src/views/material/part/partArrived/component/home.vue @@ -30,20 +30,20 @@ @keyup.enter.native="handleQuery" /> - + @@ -165,25 +165,12 @@ prop="taskStatusName" :show-overflow-tooltip="true" > - - - - - - - + 删除 @@ -381,7 +368,6 @@