From 9f84d8dace98007585e186c4a8ac4b925c1a111a Mon Sep 17 00:00:00 2001
From: jjLv <1981429112@qq.com>
Date: Fri, 25 Oct 2024 17:29:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=B4=AD=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/baseGround/newBuy.js | 5 +-
.../goodsArrived/component/addTools.vue | 60 ++++++++++++-------
.../newBuy/goodsArrived/component/home.vue | 4 +-
.../goodsArrived/component/queryTools.vue | 13 +++-
.../material/newBuy/goodsArrived/index.vue | 13 ++--
5 files changed, 61 insertions(+), 34 deletions(-)
diff --git a/src/api/baseGround/newBuy.js b/src/api/baseGround/newBuy.js
index 3b68370..0f1eeb3 100644
--- a/src/api/baseGround/newBuy.js
+++ b/src/api/baseGround/newBuy.js
@@ -10,10 +10,11 @@ export function getListNewBuy(query) {
}
//任务 详情
-export function getPurchaseCheckInfo(id) {
+export function getPurchaseCheckInfo(query) {
return request({
- url: '/material/purchase_check_info/'+ id,
+ url: '/material//purchase_check_info/getInfo',
method: 'get',
+ params: query,
})
}
diff --git a/src/views/material/newBuy/goodsArrived/component/addTools.vue b/src/views/material/newBuy/goodsArrived/component/addTools.vue
index f4eaaa4..2d67fc0 100644
--- a/src/views/material/newBuy/goodsArrived/component/addTools.vue
+++ b/src/views/material/newBuy/goodsArrived/component/addTools.vue
@@ -13,7 +13,7 @@
+ %
@@ -114,7 +116,7 @@
prop="purchasePrice"
align="center"
>
-
+
@@ -165,7 +168,7 @@
{
+ return ''
+ },
+ },
},
data() {
return {
@@ -337,6 +346,7 @@ export default {
pageNum: 1,
pageSize: 10,
id:undefined,
+ taskId:undefined,
typesList:[],
},
// 数据范围选项
@@ -373,6 +383,7 @@ export default {
supplierId: '',
},
maForm: {
+ taxRate:0,
purchaseTime: '',
arrivalTime: '',
purchaser: '',
@@ -414,6 +425,7 @@ export default {
},
deviceType: [],
propsKey: 1000,
+ taxRate:0,
}
},
computed: {
@@ -435,18 +447,11 @@ export default {
},
},
mounted() {
- // const taskId = this.$route.query && this.$route.query.taskId
- // this.taskId = taskId
- // if (this.taskId == '' || !this.taskId) {
- // this.isEdit = false
- // } else if (this.taskId != '') {
- // this.isEdit = true
- // this.getTaskInfo()
- // }
if (this.isEdit) {
console.log('isEdit',this.isEdit)
- this.id = this.editTaskId
+ this.taskId = this.editTaskId
+ this.id = this.editId
this.getTaskInfo()
}
@@ -456,7 +461,15 @@ export default {
// this.supplierInfoList()
},
methods: {
-
+ taxRateChange(val){
+ this.equipmentList.forEach(item=>{
+ item.purchasePrice = item.purchaseNoPrice*(1 + val/100)
+ })
+ },
+ purchaseNoPriceChange(row,val){
+ this.equipmentList[val].purchasePrice = row.purchaseNoPrice*(1 + this.maForm.taxRate/100)
+ row.purchasePrice = row.purchaseNoPrice*(1 + this.maForm.taxRate/100)
+ },
getParentsById(list, id) {
for (let i in list) {
@@ -506,7 +519,7 @@ export default {
item4.specificationType =
item4.typeName
this.$set(item4, 'purchasePrice', 0)
- this.$set(item4, 'purchaseNum', 1)
+ this.$set(item4, 'purchaseNoPrice', 0)
})
}
})
@@ -567,13 +580,14 @@ export default {
//获取任务详情--- 编辑回显数据
getTaskInfo() {
// this.loading = true;
- getPurchaseCheckInfo(this.id).then((response) => {
+ getPurchaseCheckInfo({taskId:this.taskId,id:this.id}).then((response) => {
// this.taskInfo = response.data
this.maForm.purchaseTime = response.data.purchaseTime
- this.maForm.arrivalTime = response.data.arrivalTime
- this.maForm.purchaser = response.data.purchaser
- this.maForm.remark = response.data.remark
- this.maForm.purchaseNumber = response.data.purchaseNumber
+ this.maForm.arrivalTime = response.data.purchaseCheckInfo.arrivalTime
+ // this.maForm.purchaser = response.data.purchaser
+ this.maForm.remark = response.data.purchaseCheckInfo.remark
+ // this.maForm.purchaseNumber = response.data.purchaseNumber
+ this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime
this.equipmentList = response.data.purchaseCheckDetailsList
// this.loading = false;
@@ -706,7 +720,7 @@ export default {
console.log('新增')
this.loading = true
addPurchaseCheckInfo(
- // {purchaseCheckDetailsList: this.maForm.checkDetailsList,purchaseCheckInfo:}
+ {purchaseCheckDetailsList: this.maForm.checkDetailsList,purchaseCheckInfo:this.maForm}
).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess(
diff --git a/src/views/material/newBuy/goodsArrived/component/home.vue b/src/views/material/newBuy/goodsArrived/component/home.vue
index c6dd2d4..38e30bb 100644
--- a/src/views/material/newBuy/goodsArrived/component/home.vue
+++ b/src/views/material/newBuy/goodsArrived/component/home.vue
@@ -668,11 +668,11 @@ export default {
},
/** 查看按钮操作 */
handleView(row) {
- this.$emit('queryTools', row.taskId)
+ this.$emit('queryTools', row.taskId,row.id)
},
/** 修改按钮操作 */
handleUpdate(row) {
- this.$emit('editTools', row.taskId)
+ this.$emit('editTools', row.taskId, row.id)
},
//----消息通知
diff --git a/src/views/material/newBuy/goodsArrived/component/queryTools.vue b/src/views/material/newBuy/goodsArrived/component/queryTools.vue
index aa7291f..049ccde 100644
--- a/src/views/material/newBuy/goodsArrived/component/queryTools.vue
+++ b/src/views/material/newBuy/goodsArrived/component/queryTools.vue
@@ -541,6 +541,12 @@ export default {
return ''
},
},
+ queryId: {
+ type: [String, Number],
+ default: () => {
+ return ''
+ },
+ },
},
data() {
return {
@@ -599,6 +605,7 @@ export default {
uploadUrl: process.env.VUE_APP_BASE_API + '/system', // 上传的图片服务器地址
dialogImageUrl: '',
dialogVisible: false,
+ taskId:undefined,
//--------------
// 表单参数
form: {},
@@ -703,8 +710,8 @@ export default {
// } else {
// this.isView = false
// }
- this.id = this.queryTaskId
-
+ this.taskId = this.queryTaskId
+ this.id = this.queryId
this.getTaskInfo()
// this.getAllUserList()
// this.getNoticeUserList()
@@ -713,7 +720,7 @@ export default {
//获取任务详情-列表数据
getTaskInfo() {
this.loading = true
- getPurchaseCheckInfo(this.id).then((response) => {
+ getPurchaseCheckInfo({taskId:this.taskId,id:this.id}).then((response) => {
this.taskInfo = response.data
this.equipmentList = response.data.purchaseCheckDetailsList
// this.equipmentList.forEach((item) => {
diff --git a/src/views/material/newBuy/goodsArrived/index.vue b/src/views/material/newBuy/goodsArrived/index.vue
index 15c8be7..6e4fe84 100644
--- a/src/views/material/newBuy/goodsArrived/index.vue
+++ b/src/views/material/newBuy/goodsArrived/index.vue
@@ -10,7 +10,9 @@
:is="isShowComponent"
:isEdit="isEdit"
:editTaskId="editTaskId"
+ :editId="editId"
:queryTaskId="queryTaskId"
+ :queryId="queryId"
:isView="isView"
:codingTaskId="codingTaskId"
@addTools="addTools"
@@ -39,6 +41,7 @@ export default {
pageContent: "新增机具",
isEdit: false,
editTaskId: "",
+ editId: "",
queryTaskId: "",
isView: false,
codingTaskId: "",
@@ -59,17 +62,19 @@ export default {
this.isShowComponent = 'Home'
},
/* 编辑工机具 */
- editTools(id) {
+ editTools(taskId,id) {
this.isEdit = true
this.pageContent = '编辑机具'
- this.editTaskId = id
+ this.editTaskId = taskId
+ this.editId = id
this.isShowComponent = 'AddTools'
},
/* 查询工机具 */
- queryTools(id) {
+ queryTools(taskId,id) {
this.isView = true
this.pageContent = '详情信息'
- this.queryTaskId = id
+ this.queryTaskId = taskId
+ this.queryId = id
this.isShowComponent = 'QueryTools'
},
/* 返回按钮 */